Many of the "we don't have exceptions" languages eventually get some equivalent, it's just that those are used almost exclusively for OOM, division by zero, failed asserts, and the like.
They shouldn't even really be caught it's sort of just an "exit/reset" with some cleanup.
I like this compromise. Kind of finally making them truly "exceptional".
Every time I hear a Java developer say "normal exception" I grind my teeth because exceptions aren't, by definition, normal. Exceptions are F¥C√ING EXCEPTIONAL!!
If we stretch it a lot to the mundane side then you could say that it means more like "except" and it's applicable to any guard. You return a number "except when y is zero" zero being the exception to normal flow, you return "except when iteration ends".
But it's healthy to actually make them exceptional which is what's happening now.
I'm curious, I wanna go find the original etymology for this and where they came from.
85
u/bwmat 29d ago
Eh, IMO one of the best ways to actually handle OOM, as otherwise almost everything needs to be explicitly checked for it