Re:I think Zig is hard but worth it
by askkk on Thursday June 01, 2023 @11:07AM
(#36152113)
In new last version 0.10.1 it seems that for is not working with two arguments?
Edited: To update, I tried snap, but using
snap install --classic --beta zig is a security risk because it can change the system and is not sandboxed.
[ Parent
| on HN ]
Re:I think Zig is hard but worth it
by EscapeFromNY on Thursday June 01, 2023 @12:04PM
(#36153140)
For loop syntax was changed since 0.10.1.
Zig 0.10.1:
for(items) |value| {}
for(items) |value, index| {}
Zig 0.11-dev: for(items) |value| {}
for(items, 0..) |value, index| {}
for(as, bs, cs, ds, 0..) |a, b, c, d, index| {}