-
Notifications
You must be signed in to change notification settings - Fork 696
Factor a multiblock
node out of tableswitch
.
#490
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
Conversation
* `tableswitch`: a jump table which may jump either to an immediate `case` | ||
child or to a label in an enclosing construct | ||
* `case`: a case which must be an immediate child of `tableswitch` | ||
* `br`: branch to a given label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing "in an enclosing construct" makes this less clear imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps that comment wasn't clear enough as well ;) I mean, why not write "in a visible construct" using the new terminology?
|
||
Branches may only reference *visible* labels. The labels in `block` and `loop` | ||
nodes are visible only from within their subtrees. The labels in `multiblock` | ||
nodes are only visible from within their subtrees, and only from above their |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"above" has the same issues as "left"/"right". How about "before"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Updated.
Would we actually still need |
I imagine |
Some more thoughts: overall I like this, but also feel like we should gather some data first. In particular, this construct can subsume block, if and if_else, so just adding it leads to some redundancy - which is perhaps justified by efficiency, but we need data to know. |
Since multiblock would not be the redundant op, could we consider the issue of whether we still need the other ops as a separate issue? |
On 12/05/2015 10:06 AM, Alon Zakai wrote:
I think it would be unfortunate to remove |
@lukewagner I personally would prefer to consider the issue as a whole, as opposed to adding all the possibilities and weeding out the unnecessary ones later. I say "all" because there are other control flow proposals as well, like And given that we should be able to get relevant data quite soon, focusing on that seems to make more sense to me. But, I don't feel strongly about this. @JSStats: I believe you can still conditionally evaluate a result using |
@kripken It's probably still computational complete, but how readable and writeable??
I would be surprised if this did not show up in encoding efficiency too. |
This also updates the wording around control flow operators in several areas.
5c78bd4
to
417a927
Compare
A lot of the discussion here has focused on the |
Perhaps introducing the |
There is not consensus to add |
As discussed in #480, this introduces
multiblock
, and simplifiestableswitch
accordingly.This also updates the wording around control flow operators in several areas.