←back to thread

Zig is hard but worth it

(ratfactor.com)
401 points signa11 | 2 comments | | HN request time: 0.021s | source
Show context
frankjr ◴[] No.36150672[source]
I've been playing with it and so far but I'm more impressed with their build system rather than the language itself (it seems to be way more flexible and simpler than alternatives which is pretty rare). They did however get the module system right. You can just organize the file structure in any way you like. I hate Rust's "everything is a single module" system with passion.
replies(1): >>36155014 #
1. mike_hearn ◴[] No.36155014[source]
How do you find it simpler? From taking a quick look it appears to just be an API for invoking build steps, and the build script is itself a Zig program.

I ask if it's really simple, because the JVM space went in the same direction with Gradle (build script = program) and by the time it gets more sophisticated that can turn out to be pretty painful. In particular, IDEs struggle to get the information they need, scripts can become highly complex, and there are various other problems.

replies(1): >>36156216 #
2. pjmlp ◴[] No.36156216[source]
Gradle is Ant reinvented, by those that didn't learn why we moved into Maven.