On Sat, Sep 13, 2008 at 10:52 AM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 13, 2008 at 09:09:58AM -0400, Will Coleda wrote:
>> > --- trunk/include/parrot/exceptions.h   (original)
>> > +++ trunk/include/parrot/exceptions.h   Fri Sep 12 21:05:37 2008
>> > @@ -87,7 +87,8 @@
>> >         CONTROL_OK,
>> >         CONTROL_BREAK,
>> >         CONTROL_CONTINUE,
>> > -        CONTROL_ERROR
>> > +        CONTROL_ERROR,
>> > +        CONTROL_TAKE
>> >  } exception_type_enum;
>>
>> Tcl can currently deal with OK, CONTINUE, BREAK, ERROR, and RETURN.
>>
>> What's TAKE?
>
> TAKE is like CONTROL_RETURN except that it signals that we expect
> execution to continue after the point of the TAKE.  It's quite
> similar to a .yield operation for coroutines.

Would CONTROL_YIELD make more sense? I would have known what yield meant.

> Speaking of exception type names, I have a question about
> CONTROL_BREAK and CONTROL_CONTINUE.  An interesting artifact
> of Perl 6 is that it has "break" and "continue" keywords, but
> they don't apply to looping constructs the way that "break"
> and "continue" do in other languages.  (The Perl analogues of
> C's "break" and "continue" are "last" and "next".)
>
> I know that we're explicitly not trying to make Parrot directly
> follow Perl's models, but perhaps the rationale for having Perl
> (both 5 and 6) choose next/last instead of the traditional
> break/continue might be applicable to Parrot nomenclature as well.
> So, perhaps CONTROL_BREAK and CONTROL_CONTINUE should really
> be CONTROL_NEXT and CONTROL_LAST

... I was going to argue about this, but soon realized it didn't
matter, as either of these sets has decipherable names.

Just make sure all the uses of the old names are updated when this changes.

>. (and we may also want a
> CONTROL_REDO in there somewhere also).
>
> Pm
>

Ok.

(We should have a plan in the HLL docs for how to deal with control
exceptions that your language doesn't speak natively.)

--
Will "Coke" Coleda

Reply via email to