Stream: ideas

Topic: Add continue keyword to for loop?


view this post on Zulip Brian Teague (Jun 04 2026 at 13:00):

I noticed in the all syntax example, we have a break keyword to exit the for loop, but no continue keyword to skip one iteration. Should continue keyword be added for support?

for a in some_list {
   # skip negative numbers
   if a < 0 { continue }
   sum = sum + a
}

view this post on Zulip Anton (Jun 05 2026 at 12:45):

Let's wait for a practical ask for continue rather than a theoretical one.

view this post on Zulip Brian Teague (Jun 05 2026 at 17:47):

It acts the same way as a guard clause in a function to exit the logic early, but waiting until someone has an actual business need for it is good.


Last updated: Jun 16 2026 at 16:19 UTC