Nice post about comptime, and zig in general.
Also first time i had run across goldbolt. Super neat!
Nice writeup on this. If I understand comptime correctly, that means that zig interprets zig while compiling zig, correct?
comptime
Yes! It’s a lot like a preprocessor or macro, but instead of another language on top of your source language, Zig’s compile-time language is Zig.
Nice, looks very D-esque. Metaprogramming done right.
(btw: my favorite D superpower is introspecting the current class)
Currently I’m writing some C++ at work. I so wish I could iterate over the members of a class like in D.
Nice post about comptime, and zig in general.
Also first time i had run across goldbolt. Super neat!
Nice writeup on this. If I understand
comptime
correctly, that means that zig interprets zig while compiling zig, correct?Yes! It’s a lot like a preprocessor or macro, but instead of another language on top of your source language, Zig’s compile-time language is Zig.
Nice, looks very D-esque. Metaprogramming done right.
(btw: my favorite D superpower is introspecting the current class)
Currently I’m writing some C++ at work. I so wish I could iterate over the members of a class like in D.