Re: RFC 88: Possible problem with shared lexical scope.
[email protected] (Chaim Frenkel) 22 Aug 2000 01:43:15 -0400
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Message-ID | <[email protected]> |
Could you tell me why you would want two finallys? Why not put them into one? <chaim> >>>>> "TO" == Tony Olekshy <[email protected]> writes: TO> Non-shared: TO> my ($p, $q); TO> try { $p = P->new; $q = Q->new; ... } TO> finally { $p and $p->Done; } TO> finally { $q and $q->Done; } TO> Shared: TO> try { my $p = P->new; my $q = Q->new; ... } TO> finally { $p and $p->Done; } TO> finally { $q and $q->Done; } TO> If P->new throws, then the second finally is going to test TO> $q, but it's not "in scope" yet (its my hasn't been seen). TO> Or is it? If it isn't, I'll take shared lexical scoping out TO> and put a note about this in ISSUES instead of the current: TO> If it is not possible to have try, catch, and finally blocks TO> share lexical scope (due, perhaps, to the vagaries of stack TO> unwinding), this feature can simply be deleted, and the outer TO> scope can be shared. TO> Yours, &c, Tony Olekshy -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183