4 ms·
> I could claim that being able to invoke “return” at any arbitrary point in the function is evidence that return is a complicated feature. Not really, because
by arcticbull 6y ago
> I could claim that being able to invoke “return” at any arbitrary point in the function is evidence that return is a complicated feature.
Not really, because a return statement (like a go-to) only has one place to go. An exception has an unlimited number of places to come from. That put it into its own special circle of hell.
- CyberRabbi 6y agoYour metric of what makes a language feature too complicated is just as arbitrary as mine. > An exception has an unlimited number of places to come from False. An exception can only come from a throw statement, which is both lexical/statically defined and finite in number within every codebase.
- arcticbull 6y ago> False. An exception can only come from a throw statement... Obviously. > ...which is both lexical/statically defined and finite in number within every codebase. Not in every case. Any time you have a library that calls into client code the set is dynamic and uncountable from the perspective of the library author.