One thing that isn't addressed in any of the exception RFC's (and it
may not be appropriate) is how to actually use it. Not in the syntactical
or semantic meaning. But in how to use it practically.

Given six lines of code within a trapping context, how does one
end up with the invariant restored at the end of the trapping context?

What in the perl6 helps me to maintain invariants? If the proposed
mechanism doesn't help me to accomplish this, then all we've done is
add more text and complexity and we should leave it be.

(Many moons ago, I developed a set of macros to do exceptions. And
during the course of use, I found I had to order my code, so that
invariants were maintained, in the face of exceptions (basically
longjmps around my code.)

Anything else, ended up with segfaults at the worst times.
)

<chaim>


>>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes:

PS> At 05:44 PM 8/10/00 +0100, Graham Barr wrote:
>> In fact the syntax could be
>> 
>> eval {
>> }
>> continue {
>> }
>> 
>> switch ($@) {
>> } if $@;
>> 
>> I just don't see the need to make perl look like other languages just for
>> the sake of makeing it look like other languages.

PS> No, I wasn't thinking that at all.  Although devil's advocate
PS> compels me to point out that Perl has often included features from
PS> other languages for the sake of familiarity, and even (according
PS> to documentation) on occasions when it considered said features
PS> broken (example: C operator precedence).

PS> But one could argue at this point that Perl's gravitational pull
PS> is now sufficient for it to borrow from itself rather than other
PS> languages, as you have done above.  I just found the
PS> try/throw/catch syntax really appealing, and it was a bonus that
PS> it would be instantly familiar to the C++/Java crowd.






-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to