Where are the generative capabilities? It seems there is no macro-like thing in Zig, though there are comptime parameters (and I guess: monomorphized templates).
https://ziglang.org/documentation/master/#Case-Study-printf-...
Zig: programming language designed for robustness optimality and clarity [video]
71–73 of 73 posts
Re: Zig: programming language designed for robustness optimality and clarity [video]
#72Earlier quoted context omitted.
In my experience from Rust & co, yep, this improves correctness a lot. Elegance, not so much.
Swift’s syntax sugar for Optionals makes working with nullable types much more elegant, too.
YMMV
Re: Zig: programming language designed for robustness optimality and clarity [video]
#73I have read quickly through the tutorial, and this looks interesting. Objectives are similar to Rust, with a few twists. A few differences that I can see: - At first glance, Rust's `enum` looks safer and more powerful than Zig's `union` + `enum`, while Zig's `union` + `enum` appears more interoperable with C. - Zig's `comptime` is quite intriguing. In particular, types are (compile-time) values and can be introspecte…
Rust does support varargs in extern functions (FWIW): https://play.rust-lang.org/?gist=92fbdf9bdc95c09d16e30c03ffa...