4 ms·
We're talking use cases. In Rust, you'd use Result where in C++ you would use exceptions. Panic is equivalent to assert and should not be used where you'd use
by epage 7y ago
We're talking use cases.
In Rust, you'd use Result where in C++ you would use exceptions.
Panic is equivalent to assert and should not be used where you'd use exceptions in other languages.
- pjmlp 7y agoC++23 might get value type exceptions, and the design is even being discussed across ISO C working group, so that will eventually change.