←back to thread

228 points Retro_Dev | 8 comments | | HN request time: 0.39s | source | bottom
1. norir ◴[] No.44466158[source]
It deeply bothers me that the zig team/community has been aggressively marketing this language while constantly making breaking changes without even providing migration tools. This is user hostile behavior. They are creating extra work for downstream users with minimal gain.

Let's take this change as an example. If I already wrote a program that used the old apis and meets my needs what is the benefit of this change for me? Now I have to go back and rewrite my old code and I might introduce a new bug in the migration, especially if I don't understand all of the nuance in the difference between the apis. Even if I agree that the new apis are better, the cost of migration might outweigh the benefits, but I am forced in to the migration or forking the compiler, which both might be bad choices for me.

It is not necessary to do this. They could, for example, have versioned stdlib and then maybe all I need to is pin my stdlib version. One complaint is that having multiple standard libraries causes more maintenance burden, but why should that be the primary concern? What is the cost to the maintainer vs. the cost to the community. If you make 1000 users spend an hour migrating their code, are you really going to save 1000 hours of maintenance burden?

Moreover, if the zig team wrote code with the assumption that they can never get rid of it, perhaps they wouldn't make so many design mistakes that all of these breaking changes become inevitable.

If I wrote a program in zig, I would feel obligated to also learn how to bootstrap it so that I wouldn't be subject to unwanted breaking changes. But then I see that bootstrapping involves some bizarre wasm hack instead of the tried and true bootstrapping approach of writing a simple first pass compiler in c (or some other language) and I am reminded again why I would never choose this language.

replies(6): >>44466233 #>>44466239 #>>44466294 #>>44466301 #>>44466304 #>>44466534 #
2. throwawaymaths ◴[] No.44466233[source]
> with minimal gain

are you sure?

3. ok_dad ◴[] No.44466239[source]
Zig is in development, devs who use it today must know it may break before 1.0. Your rant is unwarranted.
4. flohofwoe ◴[] No.44466294[source]
> zig team/community has been aggressively marketing this language

...I think the only thing that's aggressively marketed is that the Zig team isn't afraid of big and controversial breaking changes ;) If you can't handle that, then Zig currently isn't right for you, it's as simple as that.

> They could, for example, have versioned stdlib and then maybe all I need to is pin my stdlib version.

That really only makes sense for after 1.0, and even after that only for stdlib APIs that are out of the experimental phase.

But post 1.x some sort of migration support for breaking changes would indeed be much more useful than trying to prevent breaking changes at all cost.

> and I am reminded again why I would never choose this language.

...then why even write such a lengthy comment? Just ignore Zig and move on... it's not like there's plenty of other languages which might better fit your taste.

replies(1): >>44466314 #
5. LexiMax ◴[] No.44466301[source]
We're not talking about Python 2 here. This is a pre-1.0 language. As an occasional dabbler in the language, I implicitly understand this to mean that there will be breaking changes, and I have made peace with that.

Looking over the changes, they seem wise and well justified. Fixing my old codebases will be annoying, but I don't mind the annoyance if a better language comes out the other end.

6. apgwoz ◴[] No.44466304[source]
> I see that bootstrapping involves some bizarre wasm hack instead of the tried and true bootstrapping approach of writing a simple first pass compiler in c (or some other language) and I am reminded again why I would never choose this language.

The hack allows the compiler to be maintained in Zig, compiled to WASM (a supported backend), and then bootstrapped with only a wasm interpreter… and one is provided in a single C file (I believe… but haven’t looked in a while).

This is a much nicer situation than most other bootstrap scenarios. All the SMLs, for instance, require you to have a whole other SML! MoscowML bootstraps with an included Caml interpreter… but it’s not sufficient to compile MLton.

7. throwawaymaths ◴[] No.44466314[source]
anyways downloads of older versions are generally available!! like this whole bootstrapping freakout is weird. and anyways its funny to say the wasm build thing is a hack versus building with c. have you seen cmake? that whole thing is a hack.
8. heldrida ◴[] No.44466534[source]
I can't see how the team or community are aggressively marketing Zig. There's a lot of buzz around some projects written in Zig, such as Bun and TigerBeetle. Andrew Kelly isn't even on Twitter or X. It almost sounds like you're talking about the 14-year-old indie devs sharing their 1M MRR apps? It's a non-profit, created by real people working very hard to make something valuable for the rest of us... People who could easily be driving Lambos with their talent.

When someone creates something others want, it'll inevitably become popular.

If your app is stable, could you not keep using the version you're happy with?