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

Reply via email to