Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



C++23 might get value type exceptions, and the design is even being discussed across ISO C working group, so that will eventually change.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: