#1339: eliminate redundant exceptions CONTROL_CONTINUE and CONTROL_BREAK
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: RFC | Status: new
Priority: normal | Milestone: 2.0
Component: docs | Version: 1.8.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
Changes (by tene):
* component: none => docs
Comment:
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.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1339#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets