Hacker News new | past | comments | ask | show | jobs | submit login

For low level code, do you really want to abort on panic? Rust error handling is easily my least favorite part of the language, combining the disadvantages of exceptions and return codes.



Many do, yes. Panics are non-recoverable errors, and aborting produces leaner code, which is important on embedded.


Panics are recoverable though


They’re not guaranteed to be, so you can’t rely on it. You can say that you do, but then you may cut yourself off from the rest of the ecosystem. Libraries generally can’t rely on either behavior, applications choose.


And that's why I think the Rust has a worst-of-both-worlds error handling strategy.




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

Search: