I confess, I use and abuse the C syntax to do some weird things. On learning Zig, I’ve noticed that there is a particular thing I can’t do the same.
Such as:
if (condition) break;
else continue;
This doesn’t work in v0.16.0:
error: expected statement, found 'else'
else continue;
^~~~
But if you change it to:
if (condition) { break; }
else continue;
It works fine. It seems to me like this is almost an unintentional issue with the syntax of Zig. Are one-line-else’s intentionally only allowed to link to if-blocks? I don’t really care if this is specifically disallowed, my one-line else was always just an abuse of the way C parses source but it does seem weird considering one-line-else’s are also allowed in other contexts.