"David L. Nicol" wrote:
>
> Tony Olekshy wrote:
>
> > If we take this approach then when you just want to casually say
> >
> >     my $f = open $file; always { close $f };
> >
> > you can.  I like that.  In addition, [...]
>
> How about "later" instead of "always"
>
> Because: "later" is a time in the future, but we don't know exactly
> when,
>
> and "always" has an aspect of continuing in time which is
> distracting (to me.)

The problem may be that a dynamic always statement means both
"no matter what happens" and "not until later".  The static
finally clause just means "no matter what happened" (the effect
is immediate).

For the record, here is the set of keywords for various exception
handling clauses that we culled from the errors mailing list, during
the RFC process, for the Issues list in RFC 88:

    raise, always, onException, when, signal, fail, handle,
    otherwise, unwind, trap, quit, trip, deal, freak, panic,
    cope, punt, ascend, cough, sustain, overrule, and (of
    course) longjmp.

(The authors were not recorded, to protect the guilty ;-)

If we want to choose descriptive names, they should be something
like this:

        except      on_dynamic_exception_match
        always      on_dynamic_end_of_block_scope
        catch       on_static_exception_match
        finally     on_static_end_of_block_scope

or some other arbitrarily long concatenation of concept labels.  In
the end, we'll choose a more reasonable set of names, and quickly
become used to them.  I don't really care what they are, but see RFC
88 for some constraints on the properties they should satisfy.  In
particular, the keywords should not talk about "failure", because
exceptions can in fact be used to signal "success" plus a "get me
out of this mess" longjmp.  As Piers Cawley wrote during the RFC
discussions, "Ah, the 'Bloody hell it worked! That's exceptional'
style of programming." ;-)

Yours, &c, Tony Olekshy

Reply via email to