Ticket #1339 (new RFC)

Opened 12 years ago

Last modified 12 years ago

document all control exception types.

Reported by: coke Owned by:
Priority: normal Milestone:
Component: docs Version: 1.8.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

These were meant to correspond to HLL flow control, like tcl's [break] and [continue], but it seems that CONTROL_LOOP_NEXT and CONTROL_LOOP_LAST were added as well (and those are in use by NQP, etc.).

I don't particularly care which pair we keep, but having both sets is wrong.

Change History

Changed 12 years ago by tene

  • component changed from none to docs

19:40 <+dalek> TT #1339 created by coke++: eliminate redundant exceptions CONTROL_CONTINUE and CONTROL_BREAK 19:41 <@Tene> Coke: in Perl 6, at least, break is different from last 19:41 <@Coke> ... how? 19:42 <@Tene> break is used to exit the innermost containing construct that sets $_ 19:42 <@Tene> like a 'given' block. 19:43 <@Tene> and 'continue' is used to fall out of a 'when' block without throwing a 'break' exception. 19:43 <@Coke> "fall out" ? 19:43 <@dukeleto> Tene,Coke: Thanks guys, you got me unstuck! 19:43 <@Tene> Perl 6 'when' blocks end with an implied 'break' 19:43 <@Coke> (makes it sound like break again.)] 19:43 <@Coke> Tene: I think your break is not my break. 19:44 <@Tene> so: when 1 { do stuff; } default { do more stuff; } 19:44 <@Tene> the 'default' doesn't get executed. 19:44 <@Tene> but: when 1 { do stuff; continue; } default { do more stuff; } 19:44 <@Tene> the default block does get executed 19:44 <@Coke> that continue is also not like my continue. 19:45 <@Tene> So the tcl continue/break are the Perl 6 next/last 19:45 <@Coke> so you can keep break and continue, I suppose, but the way you describe them there are useless to me. 19:45 <@Coke> just annoying that I "reserved" them and they were co-opted. :P 19:45 <@Tene> It's not the first time that things have different names in tcl and perl 6 19:45 <@Coke> be nice if these were documented. =-) 19:45 <@Tene> Where would you expect to find that? 19:46 <@Coke> runtime/parrot/include/except_types.pasm 19:46 <@Tene> Oh! I know! I'll document it in the ticket rejection! 19:46 <@Coke> or perhaps in the C enum that generated it. 19:46 <@Tene> that should be sufficient, right? 19:46 <@Coke> but the .pasm is the file I'm actually using. 19:46 <@Coke> necessary but not sufficient.

Changed 12 years ago by coke

  • summary changed from eliminate redundant exceptions CONTROL_CONTINUE and CONTROL_BREAK to document all control exception types.

The "proper" uses for these control exceptions needs to be documented, as my initial tcl-style versions have been co-opted by the perl6 meanings.

Changed 12 years ago by chromatic

  • milestone changed from 2.0 to 2.1

Changed 12 years ago by coke

  • milestone 2.2 deleted
Note: See TracTickets for help on using tickets.