3 ms·
I expected this to be about ABI stability or something. Exceptions aren't a good reason because you don't have to use them. You can even use something very clos
by IshKebab 8y ago
I expected this to be about ABI stability or something. Exceptions aren't a good reason because you don't have to use them. You can even use something very close to Rust's Result<> if you want. LLVM does this.
"But what about constructors??" you cry. Again you can do something similar to Rust - make the constructor very simple and private, and the have static make() methods that return a new object or an error.
You don't have to resort to C.