News for hackers. Stuff that matters.
Re:Abstraction without overhead: traits in Rust by kinghajj on Monday May 11, 2015 @04:57PM (#9527798)
But a Rust enum is equivalent to a C-style one in the basic case. Rust's is just able to do more as well to support the common idiom of tagged unions. Unions themselves cannot be expressed safely in Rust, so it'd do little good IMHO to have different terms for them. I guess you could say that they should have avoid "enum" and went with "data" as in Haskell, but then people would complain that the basic ADTs are just enums and wonder why they can't just use "enum" like before!

There are no comments on this comment yet.