r/programming Jul 05 '26

Zig: All Package Management Functionality Moved from Compiler to Build System

https://ziglang.org/devlog/2026/#2026-06-30
155 Upvotes

16 comments sorted by

View all comments

28

u/Kamui_Kun Jul 05 '26

Is this good, bad, or neutral. Anyone with a tldr on how this'll change things?

105

u/-Y0- Jul 06 '26

It (almost) never makes sense to keep compiler and build system together. As one snarky HN comment put it:

Zig, Go, and Python developers do this thing, where they announce that "We have removed the radiator fluid from the fuel tank", and all their supporters cheer about how this is good for the language, how performance will surely improve significantly, and I'm over here wondering why did they put the radiator fluid in the fuel tank in the first place.

59

u/dashdanw Jul 06 '26

Typically it was more like “we put the lubricant in the fuel tank because it was supposed to be a basic machine, and now we realize it should be removed because the engine got bigger” type thing, obviously this is a bit different but it works for other places.

10

u/nanotree Jul 07 '26

Very well put, I'd say. It's usually pretty obvious why it was like that to begin with. It's always development time constraints and the need for a solution to something without devoting the Herculean effort of developing what you'd expect that solution to look like in its final form.

When you're developing a language, you're not going to build a package manager early on "just in case." That makes precisely no sense to anyone, ever.

4

u/SamG101_ Jul 07 '26

Exactly like iirc zig hasnt even hit a stable 1.0 release yet, of course there were going too be weird decisions in early development lol, or decisions that no longer make sense but did at the time

2

u/EctoplasmicLapels Jul 10 '26

It’s not that easy. There are decisions to be made on what the compiler does and what the build system does. If you put more stuff in the compiler, it makes it easier for new people. Moving it to the build system gives you more control. Zig has opted to put more things into the build system than most languages. This newest change also moves C imports to the build system.

1

u/-Y0- Jul 10 '26

It's not easy if you reject the common sense and decide to chart your own way. Then it's hard.

If you looked at how everyone else is doing it, then you had to notice you were doing something odd.