Live data from Hacker News

Zig: programming language designed for robustness optimality and clarity [video]

youtube.com

71–73 of 73 posts

Re: Zig: programming language designed for robustness optimality and clarity [video]

#71
post #46

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-...

Not nearly what you have in D.

Re: Zig: programming language designed for robustness optimality and clarity [video]

#72
post #49
post #19

Earlier 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.

My personal experience of Swift vs. Rust is that Swift's syntax sugar is more readable for most examples, but Rust lack of syntax sugar scales better to more exotic examples.

YMMV

Re: Zig: programming language designed for robustness optimality and clarity [video]

#73
post #48
post #18

I 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...

Ah, right.
Post reply on HN