4 ms·
Isn't all sorts of stuff metaprogramming in Zig? Generic types, vtable interfaces, printf. All use comptime to generate code.
by lerno 1y ago
Isn't all sorts of stuff metaprogramming in Zig? Generic types, vtable interfaces, printf. All use comptime to generate code.
- throwawaymaths 1y agoi think "using comptime" as a definition of metaprogramming is not really accurate... for example, i think calling this metaprogramming is really stretching it: var x: [sqrt(LENGTH)]f32 = undefined i think calling "instantiating a generic type" meta-programming is weak, since you're not doing any of the metaprogramming yourself, though i would concede that if debugging is the concern there is a point there. same goes for "using std.debug.print"