|
|
|
|
|
by kazinator
3348 days ago
|
|
Wouldn't the handlers for exception handling by dynamically scoped, not lexically? If we have a try block, and call a function, and if that function throws, we want the try block to be able to catch that. The function is not understood as having magic access to an environment; it's a pervasive dynamic environment that is visible to the current execution context at all times, in which exit points for non-local transfers are established. That's almost the entire point since an error situation that is entirely confined to a lexical scope can be dealt with using some local control flow (some form of goto, or structured derivative thereof). |
|
[1] https://perlbot.pl/pastebin/pl5u9w