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

Loop labels #199

Closed
giann opened this issue Oct 2, 2023 · 2 comments
Closed

Loop labels #199

giann opened this issue Oct 2, 2023 · 2 comments
Labels
language Issue related to the language
Milestone

Comments

@giann
Copy link
Collaborator

giann commented Oct 2, 2023

To allow breaking outer loops:

while :outer (true) {
    while (true) {
        break outer;
    }
}
@giann giann added language Issue related to the language proposal Something we consider doing labels Oct 2, 2023
@giann giann added this to the 0.4.0 milestone Oct 2, 2023
@kfird214
Copy link

kfird214 commented Oct 3, 2023

Because I think this project is drawing inspiration from zig I think it should just be the same as zig Labeled-while

outer: while (true) {
  while (true) {
    if (mabe_break_inner_loop) break;
    if (mabe_break_outer_loop) break :outer;
  }
}

@giann
Copy link
Collaborator Author

giann commented Oct 3, 2023

buzz is not really inspired by zig even though it's implemented with it. It takes more from Dart, Swift and Lua (for its architecture).

I think that starting with the label let it seem like a label could appear anywhere.

giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
giann added a commit that referenced this issue May 15, 2024
@giann giann removed the proposal Something we consider doing label May 15, 2024
giann added a commit that referenced this issue May 15, 2024
@giann giann closed this as completed in 42182f2 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Issue related to the language
Projects
None yet
Development

No branches or pull requests

2 participants