continue in labeled switch

monkyyy crazymonkyyy at gmail.com
Sat Jul 5 02:27:33 UTC 2025


from the 2026 update for zig he showed off labeled switches
https://youtu.be/x3hOiOcbgeA?si=rr69iKJOZ2CyKysi

```d
foo: switch(0){
   case 0:
     "hi".writeln;
     continue foo(2);
   case 1:
     "bye".writeln;
     break;
   case 2:
     "hello".writeln;
     continue foo(1);
   default: assert(0);
}
```
would print "hi","hello","bye" this is probably the majority of 
my uses of goto

someone tell walter zig is better c because of this


More information about the dip.ideas mailing list