Hacker News new | ask | show | jobs
by c0rruptbytes 20 days ago
i'm not cool and hip like hacker news devs, but I've been seeing Zig a lot, is this the new cool thing on the street? no more Rust?
2 comments

Zig's been around for ~10 years. It's more low-level and lightweight than Rust. Different goals, different trade-offs. If Rust is the new C++, Zig is the new C.
> If Rust is the new C++, Zig is the new C.

thank you, this helps!

I used to think Zig was the new C, but its different enough to be its own category, imho. For an actually "new" C, try https://c3-lang.org/.
Still no 1.0 version though. So technically it's year 0.
"technically" usually means something like "strictly", not "by a completely different metric". work takes time. zig has had a decade of work put into it.
Technically means according to a strict, often legal definition.

The strict definition being we don't count developments that happened before version 1.

Like when we talk about Rust, we don't mention the virtual threads or GC or the @ symbol for GC references. Even though those all happened during its development.

and when people talk about zig, they don't usually mention that zig used to have goto, casting syntax like `T(val)`, a rule that said you couldn't pass containers by value, language-level async, some truly awful syntax for what is now `try` and other operators, etc. both languages took time and work to realize that these features were not for them. very strange to deny that.

also, nitpick: they said zig has been around for ten years. this is, strictly, correct. the zig project has existed for ten years, just like how rust has existed for about 20, now. a project still exists if it is pre-1.0. nobody was talking about versions before you.

It's a hard-to-dislike language in the niche of systems programming.

The author is strongly biased and opinionated on his architectural and design choices, and those choices resonate with many.

I don't like the @ all over the place and the approach to slurping source as structs for libraries.

I would faster get back to Modula-2 or Object Pascal.