(no title)
yati | 5 years ago
I don't know of any language that does mudane error handling with exceptions that is not a mess. C++, for instance, is extremely difficult to write exception safe code in.
yati | 5 years ago
I don't know of any language that does mudane error handling with exceptions that is not a mess. C++, for instance, is extremely difficult to write exception safe code in.
knorker|5 years ago
I don't know about Rust, but Go most certainly did.
> C++, for instance, is extremely difficult to write exception safe code in.
It's WAY easier to write exception safe code in C++ than in Go, because C++ has RAII and scoped defers.
See my example for what a mess Go makes of this in this comment: https://news.ycombinator.com/item?id=25276360
I find C++ exception safe code to be pretty much trivial. Once you get used to "no naked resources" RAII just makes everything exception safe automatically.