(no title)
kfuse
|
3 months ago
That's not just Java and there is nothing really cursed about it: throwing in a finally block is the most common example. Jump statements are no different, you can't just ignore them when they override the return or throw statements.
Maxatar|3 months ago
maxdamantus|3 months ago
EDIT: actually, the PEP points out that they intend for it to only be a warning in CPython, to avoid the breaking change
ajb|3 months ago
https://www.cs.purdue.edu/homes/hosking/m3/reference/exit.ht...
But there, it's more comprensible because in order to define the interaction of return (and exit) with exceptions, they define return, and exit, to be exceptions. So then it's more obvious why return can be "caught".
o11c|3 months ago
except by throwing exceptions, which is a different problem that there's no "good" solution to (during unwinding, that is).
MangoToupe|3 months ago
How is this not cursed
metaltyphoon|3 months ago