logoalt Hacker News

jagadagayesterday at 8:41 PM2 repliesview on HN

>I've long faulted Rust's use of Result over exceptions

Why?


Replies

AlotOfReadingyesterday at 9:43 PM

Not the person you're asking, but result types pessimize code more, add register pressure, use more icache for largely dead code, etc. They're arguably noisier at the source level too.

That said, I've spent too much of my life chasing implicit control flow to accept exceptions. Heck, C++'s "noexcept" is a strong argument against exceptions all by itself.

wasmpersonyesterday at 10:22 PM

The worst part about rust not having exceptions is that it actually does have exceptions, you just shouldn't use them. All the downsides and none of the benefits:

https://smallcultfollowing.com/babysteps/blog/2024/05/02/unw...