Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document all control exception types. #356

Open
coke opened this issue Nov 29, 2009 · 2 comments
Open

document all control exception types. #356

coke opened this issue Nov 29, 2009 · 2 comments

Comments

@coke
Copy link
Contributor

coke commented Nov 29, 2009

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.

Originally http://trac.parrot.org/parrot/ticket/1339

@tene
Copy link
Member

tene commented Nov 29, 2009

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.

@coke
Copy link
Contributor Author

coke commented Nov 29, 2009

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants