News for hackers. Stuff that matters.
Re:What Makes the Zig Programming Language Unique? by boundchecked on Thursday October 06, 2022 @12:05AM (#33104262)
Zig's comptime variables had this fairly bonkers behavior that basically evaluate by themselves regardless of the underlying runtime controlflow[1], I thought it was cool, but seems to be disabled on trunk build.

[1]https://godbolt.org/z/dbnG9eev7

Re:What Makes the Zig Programming Language Unique? by Mathnerd314 on Thursday October 06, 2022 @12:25AM (#33104371)
From testing it seems like it is executing both branches, i.e. if (b) { v+= x; } else { v += y; } is effectively v += x + y. That doesn't make much sense so I can see why it was fixed.