3 ms·
I'd argue that they have demonstrated that: - unions are not a panacea and are a pain to handle manually, as you wrote; - but with a little syntactic sugar, t
by Yoric 4y ago
I'd argue that they have demonstrated that:
- unions are not a panacea and are a pain to handle manually, as you wrote;
- but with a little syntactic sugar, they turn out to work really, really well, much better than C++-style exceptions.
There's something to be said for OCaml-style exceptions, which are actually even closer to zero-cost, but I wouldn't call OCaml a systems programming language.
Writing this as one of the persons who advocated for try! around the time of Rust 0.4 :)