Skip to content

Break / Branch? #445

@kripken

Description

@kripken

This repo currently has br: branch to a given label in an enclosing construct. I assume the intention is that

(block $block
  (branch $block) // goes to $more
)
(block $more)
)

Is my understanding correct?

If so, isn't this more of a "break" than a "branch"? We not are not actually branching to $block, we are going to $more in fact. But the name "branch" implies to me "branch to". It seems nicer to do either

  1. (branch $more), which says "branch to $more" (where we actually branch to), or
  2. (break $block), which says "break on $block" (just like a C/JS/etc. break on a labeled block),

over the current state, which says (branch $block) but actually does not branch to $block.

Obviously 1 is a forward goto, which is bad. How about 2?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions