Rant: On the C++ std::experimental::variant to come
talesofcpp.fusionfenix.com
talesofcpp.fusionfenix.com
I will say that having being exposed to Rust's Enums(sum types) I don't think I can ever go back. Combined with pattern matching it's a hell of a combo.
More importantly, dereferencing a None is not undefined behavior in Rust.
Ok, I wasn't aware of this.
>More importantly, dereferencing a None is not undefined behavior in Rust.
That's an unrelated point. I never said Rust enum's have no advantages.
Rust explicitly omits the sentinel value and leaves it to the compiler so that it can decide how to optimize best.
edit: replaced * with star to defeat italicizer.