16 ms·
Zig breaking change – Initial Writergate
- stitched2gethr 1y agoWell it's about time.
- ksynwa 1y agoIs Writergate a technical term or a reference to Watergate?
- n42 1y agoin a sense it's a reference to Allocgate (a previous big breaking change to allocators in Zig), which was itself a reference to Watergate
- hsn915 1y ago[flagged]
- cornstalks 1y agoGamergate was not the first scandal (post-Watergate) to use -gate: https://en.m.wikipedia.org/wiki/List_of_-gate_scandals_and_controversies https://en.m.wikipedia.org/wiki/List_of_-gate_scandals_and_c...
- hellerve 1y agoAs a data point: I can honestly say I’ve never heard of Gamergate before this comment, and I am a 31-year-old white male. I did read a book on Watergate when I was in my teens, though.
- moomin 1y agoGamerGate is well worth understanding. While some of the details are unique to the situation, it’s provided a template for right-wing radicalisation that’s been employed multiple times since. There’s also an entertaining “where are they now” aspect where some people have been almost forgotten and some are in the White House. KotakoInAction is still going and has (inevitably) morphed into a bunch of people complaining about the Lūgenpresse.
- stanac 1y agoThis comment smells like LLM output, you have said a lot, but I didn't understand anything.
- moomin 1y agoLet’s just say that I think it’s an important event and understanding how a guy harassing his ex-girlfriend became a formative moment in alt-right history is fascinating, but I really don’t want to get drawn into arguments with anyone who’s still drinking that particular kool-aid.
- kzrdude 1y agoI thought the series made by some journalist was very interesting, I don't remember her name, and I don't remember so much of gamergate. But I'm definitely not a core part of either group there..
- kzrdude 1y agoby now it's a well worn/used trope to make -gate names for any scandal. But the distance in time (and culture) to the original Watergate scandal is growing, so it seems less impactful now.
- simondotau 1y agoWeird that anyone is downvoting this, as it’s a precisely correct answer.
- lenkite 1y agoIt also deeply confuses international readers. Need to learn American history to to get an idea of what is being conveyed.
- hiccuphippo 1y agoEvem not knowing the history of Watergate, it's a meme now. A few months ago in a spanish speaking country there was a case known as "Rolexgate": https://en.wikipedia.org/wiki/Rolexgate https://en.wikipedia.org/wiki/Rolexgate
- geon 1y ago> the original Watergate scandal You mean the Watergate-gate?
- brabel 1y agoI like Zig but it seems to just keep redesigning itself, while other languages like Odin “shipped” long ago and don’t seem to need to look back. Is Zig suffering from perfectionism syndrome where things are never good enough??
- silisili 1y agoThat's kinda my experience with watching Zig. It went from 'look how simple this is' to 'look at this new feature syntax' long ago. People used to compare it as simpler than Rust. I don't agree that it's simple anymore at all. None of this is meant to be badmouthing or insulting. I'm a polyglot but love simple languages and syntaxes, so I tend to overly notice such things.
- Laremere 1y agoThe computer is a machine, and modern ones are complicated. When I am programming, I want to precisely control that machine. For me, simplicity is measured in how complicated it is to get the machine to do what I want it to do. So, eg, having several different operators for adding two integers sounds complicated. However there is simplicity in not having to reach far to actually get the correct behavior, and there is some simplicity in the process of being forced to make that choice as it irons about what behavior you actually want.
- silisili 1y agoI think that's long been the argument of simplicity. 'Simple to remember' vs 'simple to perform.' I tend to fall into the former camp. Something like BF would be the ultimate simple language, even if not particularly useful.
- lewdwig 1y agoStructured concurrency is a notoriously hard problem. This is part of Zig’s 4th attempt to get it right.
- 1y ago
- zwnow 1y agoAnd this is exactly why you do not use shiny new languages for your projects. Hope tigerbeetle won't have too much trouble with this
- hmry 1y agoZig is the only language I've used where every library specifies the one (and only) compiler version it works on in their GitHub readme.
- Hamuko 1y agoAre people deploying production code in a language that is still in its 0.x version?
- zwnow 1y agoI dont but there are companies who trust the language (which is a good thing but also short sighted)
- cenamus 1y agoI mean, what's the difference to the python 2/3 debacle? People were writing/extending in python 2 long after it was declared obsolete
- Hamuko 1y agoNot having breaking changes every N months?
- blippage 1y agoI tried Zig some time ago to use with microcontrollers. It has a generator for the pins, which was nice. But subsequent versions broke as Zig changed syntax. So I started going down the rabbit-hole (it needed a newer version of llvm, for example) until I eventually decided that the game wasn't worth the candle. The fact that another breaking change has been introduced confirms my suspicion that Zig is not ready for primetime. My conclusion is to just use C. For low-level programming it's very hard to improve on C. There is not likely to be any killer feature that some other contender will allow you to write the same code in a fifth of the lines nor make the code any more understandable. Yes, C may have its quirky behaviour that people gnash their teeth over. But ultimately, it's not that bad. If you want to use a better C, use C++. C++ is perfectly fine for using with microcontrollers, for example. Now get back to work!
- eddythompson80 1y ago> The fact that another breaking change has been introduced confirms my suspicion that Zig is not ready for primetime. Huh, it was the 0.14 version number for me.
- dtech 1y ago0.x doesn't say as much as it used to 20 years ago, many fine projects keep it for way too long.
- eddythompson80 1y agoZig has a pretty well documented 1.0 goals. It was the first thing I heard about zig from Andrew about. https://youtu.be/5eL_LcxwwHg https://youtu.be/5eL_LcxwwHg
- arp242 1y agoYes, that was the point. To understand what that "0.14" means, we need to know those "well documented 1.0 goals" and some hour long YouTube video. That is, merely the "0.14 version number" without context is not enough, like your previous comment said.
- drtgh 1y agoBy the title I thought that they were going to implement this, https://github.com/ziglang/zig/issues/5973 https://github.com/ziglang/zig/issues/5973
- Aissen 1y agoThis is why it's good to have automated tooling that can do semantic changes on your language and standard library use. Go has `go fix` even if it was only used in pre-1.0 days AFAIK. It is never lost because this type of tooling can be used as the foundation for linters, refactoring tools, etc. Is there such a solution in Zig?
- flohofwoe 1y agozig fmt has some auto-fixes for upgrading source code to new Zig versions, AFAIK it's only for language changes, not stdlib changes though.
- Aissen 1y agoNice, I wonder if adapting it for this change would make sense?
- throwawaymaths 1y agoits a really huge change
- Aissen 1y agoIsn't that an argument for automated fixing?
- throwawaymaths 1y agohuge in complexity. though looking at it i see andrew has made a "polyfill" ish thing to give ppl a way out for a ?(a few)? releases
- jedisct1 1y agoZig Roadmap 2026 : https://www.youtube.com/watch?v=x3hOiOcbgeA https://www.youtube.com/watch?v=x3hOiOcbgeA
- timeon 1y agoIs there non-video version?
- deleted 1y ago[deleted]
- AndyKelley 1y agohttps://ziglang.org/download/0.14.0/release-notes.html https://ziglang.org/download/0.14.0/release-notes.html
- kristoff_it 1y agoFor context this was presented, alongside other things, in the Zig Roadmap 2026 stream. VOD: https://youtu.be/x3hOiOcbgeA https://youtu.be/x3hOiOcbgeA
- lpapez 1y agoAt my first job, the senior guy on my team used to say: "Software is just like lasagna. It has many layers, and it tastes best after you let it sit for a while". I still follow this principle years down the line and avoid introducing shiny new things on my projects.
- WhereIsTheTruth 1y agowell, in that case, the lasagna is still being cooked, until served (1.0), why question the chef? let him cook
- 8n4vidtmkvmk 1y ago1.0s never land smoothly. That's when the herd of users comes and all the rough edges are actually found. The real 1.0 is 1.1.
- GolDDranks 1y agoI have written very little Zig and a lot of Rust, but I love both languages. However, Zig having breaking changes has made me wary of not starting anything serious it with – yet. I'm still happy that these changes happen, because I'm willing to wait for a stable version. Meanwhile, I enjoy myself some Rust, and probably continue doing so.
- adastra22 1y ago[flagged]
- rcastellotti 1y ago[flagged]
- ladyanita22 1y agoBe as sarcastic as you want. This is a feeling many developers probably share.
- 3836293648 1y agoThen those developers won't ever use anything ever. Why would breaking changes in an explicitly unstable development version exclude it from use for all time? If you want stability, stick to stuff that has stability guarantees, but at the very least let them make breaking changes during development.
- ozgrakkurt 1y agoAnd “I don’t care if you use it or not” is a feeling many other developers share so both are valid
- deleted 1y ago[deleted]
- thiht 1y ago[flagged]
- noobermin 1y agoThis arguably is why julia still has no real users and python, c++, and fortran still rule in hpc, despite hypsters doing the hyping. At some point people just want their code to work so they go back to something that just works and won't break in a few years.
- throwawaymaths 1y agohow was python 2/3 again?
- nromiun 1y agoFamous because of how rare it was.
- vrighter 1y agopython is a really bad example. Code constantly stops working properly with language updates.
- noobermin 1y agoThere was one language update that broke things, so much so that it was discussed for years. The julia breaking updates are myriad and ongoing
- vrighter 1y agoso are you telling me nothing breaks ever if you update python 3 minor versions? Because if so, I don't believe you. They also make breaking changes
- burnt-resistor 1y agoIs R still big in biomedical informatics? My frame-of-reference is 20 years ago.
- mtlynch 1y agoAs a hobby Zig developer, it's a bummer to see a breaking change in something so fundamental, but I get that's what I accept when building on a pre-1.0 language. I hope that the Zig team invests more into helping with migration than they have in the past. My experience for past breaking changes is that downstream developers got left in the cold without clear guidance about how to fix breaking changes. In Zig 0.12.0 (released just a year ago), there were a lot of breaking changes to the build system that the release notes didn't explain at all. To see what I mean, look at the changes I had to make[0] in a Zig 0.11.0 project and then search the release notes[1] for guidance on those changes. Most of the breaking changes aren't even mentioned, much less explained how to migrate from 0.11.0 to 0.12.0. >Some of you may die, but that is a sacrifice I am willing to make. >-Lord Farquaad [0] https://github.com/mtlynch/zenith/pull/90/files#diff-f87bb3596894756629bc39d595fb18d479dc4edf168d93a911cadcb060f10fcc https://github.com/mtlynch/zenith/pull/90/files#diff-f87bb35... [1] https://ziglang.org/download/0.12.0/release-notes.html https://ziglang.org/download/0.12.0/release-notes.html
- AndyKelley 1y agoI'm definitely looking at the example set by hare with interest[0]. Also unironically love Shrek. I once hosted a viewing party of Shrek Retold[1] in my tiny NYC apartment :D [0] https://harelang.org/blog/2025-06-11-hare-update/ https://harelang.org/blog/2025-06-11-hare-update/ [1] https://www.youtube.com/watch?v=pM70TROZQsI https://www.youtube.com/watch?v=pM70TROZQsI
- mtlynch 1y agoGood to hear! (on all fronts) An automated tool would be great, but even good documentation with examples of before vs. after code snippets would go a long way.
- thayne 1y agoThis is why I'm surprised when production projects, like bun, choose to use zig. I don't think the language itself is a bad choice (although I do disagree qith some of the design decisions), but having to make substantial changes when there are breaking changes like this because the language is pre-1.0 every so often in a large code base isn't something I would want to deal with.
- thrwyexecbrain 1y agoJust to start some discussion about the actual API and not the breaking change aspect of it: I find the `Reader.stream(writer, limit)` and `Reader.streamRemaining(writer)` functions to be especially elegant to build a push-based data transformation pipeline (like GREP or compression/encryption). You just implement a Writer interface for your state machine and dump the output into another Writer and you don't have to care about how the bytes come and how they leave (be it a socket or shared memory or file) -- you just set the buffer sizes (which you can even set to zero as I gather!) `Writer.sendFile()` is also nice, I don't know of any other stream abstraction that provides this primitive in the "generic interface", you usually have to downcast the stream to a "FileStream" and work on the file descriptor directly.
- AndyKelley 1y agore: sendfile in the interface - that's important because while downcasting the stream to "FileStream" would work if your pipeline looks like A -> B, it falls apart the moment you introduce an item in the middle (A -> B -> C). Meanwhile I have a demo of File -> tar -> HTTP (Transfer-Encoding: chunked) -> Socket and the direct fd-to-fd copies make it all the way through the chain!
- 90s_dev 1y agoI don't mind breaking changes if I can fix them within a day. What bothers me with C/C++ is how difficult it is to cross compile a simple Windows + SDL app from inside WSL without MSVC installed. I've spent weeks on this. If Zig saves me from that nightmare, and still lets me use C++ libraries, I will gladly switch over to it.
- flohofwoe 1y agoYou'll have to write C API wrappers around your C++ libraries to access them from Zig, but other then that I can cross-compile my mixed C/C++/Zig projects using Windows APIs like DXGI/D3D/WASAPI with `zig build -Dtarget=x86_64-windows` from a Mac with the vanilla Zig toolchain. ...you don't even need to port anything in your C/C++ project to Zig, just integrate `zig cc` as C/C++ compiler into your existing build system, or port your build system files to build.zig.
- 90s_dev 1y agoThat works out great, since all the libraries I need are C or have C wrappers anyway. I might actually do this, thanks.
- forrestthewoods 1y agoWait what. Shouldn’t zig crosscompile C++ just fine?
- flohofwoe 1y agoYes, the C++ code compiles just fine, but to call into C++ APIs from Zig you'll need a C API wrapper (and the same is true for ObjC APIs). Not an issue of course for pure C++ projects when the Zig toolchain is just used for cross-compiling.
- forrestthewoods 1y agoOooh yeah that makes sense.
- tobyhinloopen 1y agoEvery time I touched Zig, examples I found on the internet were no longer working. I worked on a project for a while and then the stuff I used was deprecated / broken on the newer version. I like Zig, but I'm waiting for it to become somewhat stable, because the amount of breaking changes feels pretty significant. I suppose that's the price of progress.
- melodyogonna 1y agoThat is because the language is pre-1.0. The new language I follow a lot is Mojo, it also has this problem. I think the only way to follow a new (unstable) language is to join whatever community where the conversation happens; otherwise, what you think you know about the language will become outdated pretty quickly.
- deleted 1y ago[deleted]
- barelysapient 1y agoA big change like this makes me hopeful Zig may revisit and improve other design choices in the future.
- bbkane 1y agoCould you elaborate on the choices you'd like revisited?
- 90s_dev 1y agoUnused variables stops all further compilation, so that even future errors can't be seen until the variable is used.
- Mond_ 1y agoMeh. I think this should be a warning on debug builds and an error on release builds, but it's a relatively minor thing and not a deal breaker by any means. If this is the worst thing that people would like to see revisited, Zig must be doing amazingly well.
- josephg 1y ago> but it's a relatively minor thing and not a deal breaker by any means. It totally breaks my normal workflow. I don’t use zig at all because of this misfeature. Warn in debug and error on release builds would be strange but fine.
- deleted 1y ago[deleted]
- mlugg 1y agoThis is simply not true. See https://zigbin.io/f57b94/run https://zigbin.io/f57b94/run. (That link seems to show the "unused local variable" error line twice for me; that's some kind of bug with this zigbin service and does not reproduce when running the Zig compiler normally.)
- dnautics 1y agosomething that I don't understand about the actual API: I maintain the zigler library, and one thing that was useful about the old async "colored-but-not-really" functions was that they implicitly tolerate having internal suspend points (detail: https://www.youtube.com/watch?v=lDfjdGva3NE&t=1819s https://www.youtube.com/watch?v=lDfjdGva3NE&t=1819s) -- I'm not sure if having IO be a passed parameter will still let me do that? Can users build their own functions with yield points? And will you be able to jump out of the frame of a function and give control back to the executor, to let it resume later?
- AndyKelley 1y agoHi Isaac, good to (virtually) see you. As you're aware, that feature of the language ("stackless coroutines", "generators", "rewriting function logic into a state machine") was regressed. At first, this new IO interface won't have that capability. However, as a followup issue, I'd like to reintroduce it, potentially in more low-level manner, for use inside IO implementations. Combined with restricted function pointers, this will allow functions that can suspend to pass through runtime-known function pointer boundaries - something that was terribly clunky before to the point that it compromised the entire design. This means that, again, the same IO interface usage code will be able to be reused, including when the implementation uses suspend points, and the automatic calling convention rewriting will be able to propagate through the interface into the usage code. The issue to track is: https://github.com/ziglang/zig/issues/23446 https://github.com/ziglang/zig/issues/23446 I'll add that I'm still keen on the previous suspend/resume keywords and semantics as a solution to this issue.
- dnautics 1y agothanks! I would have asked on stream but I'm in a bit of a different timezone than usual so my ability to track livestream times competently has regressed. As an aside, do you think in the near future there will be a "guide to building a compiler backend" either in-project or by the community?
- AndyKelley 1y ago
- ww520 1y agoOne issue I have with the old reader/writer pattern is that it is not easy to store them in a struct. Reader and writer are passed into a function as 'anytype' which implements any of the read() or write() functions. Often time in a struct's init() function, I want to take in a reader/writer and store it for later use. It's close to impossible since I don't know what type of the field of the struct to store them. Does the new change make it easier to store reader/writer in a struct?
- AndyKelley 1y agoYes, that is precisely what "non-generic" means.
- ww520 1y agoThat's excellent! Thanks for the changes.
- norman784 1y agoI recommend watch this video https://youtu.be/x3hOiOcbgeA https://youtu.be/x3hOiOcbgeA
- ww520 1y agoNice video. I especially like the new 'labeled switch' feature providing a freeform control flow, and the watch/incremental compile feature. I used to use Rust's watchexec to do zig build on changes; now the watch feature is built natively in zig. The IO based async/await stuff seems to be the right direction; it's following the familiar Allocator pattern. The integrated fuzz testing into the compiler tool chain is fantastic; I can write much less unit tests now. Zig.day looks like a wonderful way to do laid back hackathons. Looking forward to one coming up.
- dnautics 1y agoI maintain a library to interface zig with elixir and the breaking changes have not been a big deal. As a part of the library I have maintain a zig parser (the official parser in the langref is not up to date) and I scan the entire zig codebase against my parser to make sure it doesn't trip up on anything. Also I can't use zig fmt to keep up because some of the code is templated and embedded in Elixir. The last two semver minor updates, the net total amount of changes I have had to do to keep up with the language took me maybe an hour? Also subjectively, I feel like the breaking changes that affect me have been fewer and easier to deal with since the early days. The bulk of the delay in updating the library was chipping away at things that i had put off since the last update (also i don't use the library in $DAYJOB since I "quit tech", though I do vibecode solutions for myself). Point being, I feel like a lot of the gripes about zig changing here and there are really by folks who aren't really daily users, just people who see a !!breaking change!! announcement and pile on. Though, I do sympathize with newcomers because the memory of the internet is pinned to various older versions with lots of demo code that 'just doesn't work' and of course that means LLMs too, in the long run. Hopefully zig doesn't get stuck past the global knowledge/popularity LLM-cycle cutoff. I don't think it will.
- shmolyneaux 1y agoThe problem for newcomers is something I faced when trying to use Zig, particularly for the build system. I heard a lot about how much nicer the build system is in Zig compared to other tools. However, as someone unfamiliar with C/C++ build systems I found it very hard to get anything configured. In contrast, I tried to learn CMake after. Despite my gripes about the CMake language itself, I found it relatively straightforward to do everything I wanted. Docs, backwards-compatibility, and LLMs made it all easy to set up. I have a hybrid C++/Rust project that compiles to desktop/WASM with debug/release builds. When the build system for Zig stabilizes I'm sure things will be better, but the breaking changes are rough based on my recent experience.
- scrubs 1y agoZig's build system is in zig code. Cmake/make/ninja/meson are not. That's a notable difference. My initial take on the zig stuff is that it's a bit complex ...
- norir 1y agoIt 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.
- throwawaymaths 1y ago> with minimal gain are you sure?
- ok_dad 1y agoZig is in development, devs who use it today must know it may break before 1.0. Your rant is unwarranted.
- flohofwoe 1y ago> 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.
- thayne 1y agoWhat if you want unbuffered IO?
- thrwyexecbrain 1y agoI think you just initialize Reader and Writer with a zero-length buffer.
- kristoff_it 1y agoCorrect, which is also something that you want to do when creating Reader / Writer chains.
- samgranieri 1y agoAs someone zig-curious who has to jump around between ruby and elixir, if there’s a nice linting tool that can notify and maybe auto-correct, then I don’t see this as an issue