RFC 88: Possible problem with shared lexical scope.
[email protected] (Tony Olekshy) Sun, 20 Aug 2000 12:44:37 -0600
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Organization | Avra Software Lab Inc. |
| Message-ID | <[email protected]> |
Non-shared:
my ($p, $q);
try { $p = P->new; $q = Q->new; ... }
finally { $p and $p->Done; }
finally { $q and $q->Done; }
Shared:
try { my $p = P->new; my $q = Q->new; ... }
finally { $p and $p->Done; }
finally { $q and $q->Done; }
If P->new throws, then the second finally is going to test
$q, but it's not "in scope" yet (its my hasn't been seen).
Or is it? If it isn't, I'll take shared lexical scoping out
and put a note about this in ISSUES instead of the current:
If it is not possible to have try, catch, and finally blocks
share lexical scope (due, perhaps, to the vagaries of stack
unwinding), this feature can simply be deleted, and the outer
scope can be shared.
Yours, &c, Tony Olekshy