# Proposal: remove continue-expression of while loops from the language

**URL:** <https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856>\
**Category:** Brainstorming\
**Created:** [October 5, 2026, 6:40pm UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856 "2026-10-05T18:40:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarumSoZickZack](https://ziggit.dev/letter_avatar_proxy/v4/letter/w/898d66/32.png) [@WarumSoZickZack](https://ziggit.dev/u/WarumSoZickZack)\
**Post date:** [October 5, 2026, 6:40pm UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856/1 "2026-10-05T18:40:04Z")

</div>

> [@Ministry of silly loops](https://ziggit.dev/t/ministry-of-silly-loops/11383/4):
>
> Stay a while and listen: var i: u32 = 0; while (i \< 10) { defer i += 1; print("{d}\n", .{i}) } Tricked you, this one is a serious loop, not a silly loop! I think while (condition) : (increment) loops are redundant and should be removed from the language. while (condition) : (increment) { body; } is, as far as I can tell at 3AM, fully equivalent to while (condition) { defer increment; body; } But the latter is so much more readable! You don’t need to guess semantics of…

what about adding a new keyword ‘continuedefer’ (or maybe ‘loopdefer’, …) that defers a statement in a loop IFF the loop continues (explicitly with ‘continue’ or implicitly by reaching end of loop body). I think this would solve an issue initially stated by @matklad (and the edge case stated by @andrewrk in the comment), since it would allow to replace the while () : ([continue expression]) syntax with a keyboard based explicit control-flow. Also this concept of a conditional defer already existst in the language: ‘errdefer’

---

<div class="post-metadata">

**Author:** ![ForeverZer0](https://ziggit.dev/user_avatar/ziggit.dev/foreverzer0/32/2443_2.png) [@ForeverZer0](https://ziggit.dev/u/ForeverZer0)\
**Post date:** [October 5, 2026, 7:08pm UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856/2 "2026-10-05T19:08:10Z")

</div>

Could you explain why this would be better?  
I simply don’t see the problem being solved here.

---

<div class="post-metadata">

**Author:** ![pierrelgol](https://ziggit.dev/user_avatar/ziggit.dev/pierrelgol/32/10233_2.png) [@pierrelgol](https://ziggit.dev/u/pierrelgol)\
**Post date:** [October 5, 2026, 8:53pm UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856/3 "2026-10-05T20:53:44Z")

</div>

I’m personally not in favor of adding another keyword especially for such a niche issue. I’d rather get distinct types, ranged integers, matrix support, better type and numerical coercion/cast ergonomics. Better translate-c, better anytype, and plently of other proposal, those are all demonstrably useful, without a huge cost in some case, in terms of complexity, this seems not really important enough to warrant a new keyword

---

<div class="post-metadata">

**Author:** ![GreyCoat](https://ziggit.dev/letter_avatar_proxy/v4/letter/g/6bbea6/32.png) [@GreyCoat](https://ziggit.dev/u/GreyCoat)\
**Post date:** [October 5, 2026, 9:39pm UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856/4 "2026-10-05T21:39:52Z")

</div>

Just voicing my opinion that, having read the reasoning presented in this and similar posts proposing that this syntax be removed, I am not convinced and remain against its removal.

---

<div class="post-metadata">

**Author:** ![vulpesx](https://ziggit.dev/user_avatar/ziggit.dev/vulpesx/32/3989_2.png) [@vulpesx](https://ziggit.dev/u/vulpesx)\
**Post date:** [October 6, 2026, 3:21am UTC](https://ziggit.dev/t/proposal-remove-continue-expression-of-while-loops-from-the-language/17856/5 "2026-10-06T03:21:53Z")

</div>

Just pointing out that a `defer` is already _almost_ identical to the continue expression, with the one caveat that a `defer` will run when the loop breaks but the continue expression won’t.  
The majority of loops in my experience are not affected by this difference and it isn’t hard to work around.
