Hacker News new | ask | show | jobs
by Ygg2 406 days ago
Not gonna lie, most of those things look like negatives.

- Zig main source of QnA is a black box (Discord)? One that might be soon enshittified to hell because we have to satisfy the IPO.

- Zig uses Gradle style approach to Maven. Having used Gradle, I honestly can't recommend it. Too much freedom in build pipeline leads to too many footguns.

- Zig changes in big exciting ways, sounds like euphemism for breaking changes. Having those on framework level is tiring, having those on language level is hell.

2 comments

1. I agree

2. I guess this is a matter of perspective. I don't have strong opinions on build systems but as someone who only occasionally dabbles in systems programming, I know that Zig's build system is infinitely more approachable and coherent than the monstrosities of CMake and any other build system I've ever come across in various C and C++ projects.

3. That's true, but Zig isn't 1.0 yet so that's to be expected.

> I don't have strong opinions on build systems but as someone who only occasionally dabbles in systems programming, I know that Zig's build system is infinitely more approachable and coherent than the monstrosities of CMake and any other build system I've ever come across in various C and C++ projects.

Whenever a language builds their own build system in a programming language or a DSL, the issue of composability rears its ugly head. Yeah, it's a bit better to write Zig build in Zig than Bash, or some Groovy DSL.

What it doesn't change that it's hard to compose them. Do you want to add code coverage? Well, you now need to figure out where to add code coverage in your custom build script. Rather than a linear set of steps, you have a tangle of unique "solutions" rather than a standard way to extend the process.

> Zig main source of QnA is a black box (Discord)?

The Discord is quite okay-ish for getting a quick answer for things you're blocked on. For proper discussions and deeper questions, Ziggit is a better choice (which is also a 'proper' forum):

https://ziggit.dev/latest

> Zig uses Gradle style approach to Maven.

Zig's build system is conceptionally further away from both Gradle and Maven than Gradle is different from Maven (having to wrestle with both from time to time, my personal opinion is: both are a huge pile of excrement, unfit for real-world usage - even cmake is better than what the Java world accepts as build systems, and that's some achievement ;)

At least the Zig build system looks promising in the way that simple things are simple and complex things are possible, even though the API still sometimes doesn't quite know if it wants to be imperative or declarative. But the basic idea is that the Zig build system and package manager are "just" part of the regular stdlib and that your build process is a regular Zig program that gets compiled and then executed to perform the build.

> Zig changes in big exciting ways, sounds like euphemism for breaking changes

...which is completely expected of a pre-1.0 status. OTH, the last couple of versions were not worse than fixing new warnings after a minor C/C++ compiler update.

> ...which is completely expected of a pre-1.0 status.

I fully agree, but I assume you want to ship your game (i.e. its a game not a toy). At least to Windows. Building your game on pre 1.0 language is like building a house on sand that's being transported by a truck.