Originally posted by mdedetrich
View Post

Even when EH *is* actively used though, it simply just *isn't* "incredibly expensive" any more. That's not even actually all that important, but it's worth correcting. You're still talking about the distant past. But for now, let's just agree that it's non-zero and leave it at that.
But to your main point: well, yeah. I don't think anybody's suggesting that we should start writing code like "if (a != b) throw compare_failed()" for integer types.

But I think you're misunderstanding the term "exceptional", based on - again - guidance from 20 years ago.
> Otherwise you should treat your error case as normal values and pass them along (and thats what Rust's Result/Option is for).
You're conflating two very different things here - and neither of them is even the point!
It's late, and I'm tired, and if you're seriously trying to understand then this deserves a much more detailed reply than I can give it tonight. I'll try to come back to it, but if I forget over the weekend feel free to PM me a reminder.
Leave a comment: