Glenn Linderman wrote:
> 
> Tony Olekshy wrote:
> 
> > RFC 88 does say:
> >
> >     finally { ... }
> >
> >     Once the try block is entered, every finally block is
> >     guaranteed to be entered before the try statement completes,
> >     whether or not any exceptions have been raised since the try
> >     block was entered.
> >
> > I would take that to mean that goto, next, return, &c from try
> > or catch does *not* skip finally, because the try block was
> > "entered".
> 
> Yes, I referred to that quote in the third paragraph of RFC 119's
> "=head2 Control flow:" section which is part of the comparison
> between the RFCs, and wondered if that was for sure what it meant.
> Since the example "next" was in a catch block, where the problems
> are harder, I think this could be helpfully clarified.

Thanks, it's queued.

> [...] equivalent except for the "my $dummy" declaration.
> 
> I think the equivalent could also be
> 
>      {
>         {} always { &do_something(); }
>         ...
>      }
> 
> Or maybe even
> 
>       {
>         always { &do_something(); }
>         ...
>       }

Yes, well, at this point I must re-iterate that (in light of reasons
for the existence of a try keyword that I have explained in other
messages), what you've written is the same as:

        try { ... } finally { &do_something(); }

So, I think, try/throw/catch/finally/exception are orthogonal (now
that we all agree what that word means) to "always", that "always"
should stand on it's own, that "always" is a good idea (I mean, it
has been discussed in p5p in the past), and that it should have its
own RFC.

Yours, &c, Tony Olekshy

Reply via email to