How Rust Implements Tagged Unions
http://patshaughnessy.net/2018/3/15/how-rust-implements-tagged-unions [patshaughnessy.net]
2018-03-29 18:46
Not sure what a tagged union is? Or why it’s an improvement over an old fashioned C union? Today I’ll explain. First I’ll start with a quick review of C unions, how they work and why they are dangerous. Then I’ll show you how Rust enums improve on them.