News for hackers. Stuff that matters.
Re:Zig breaking change – initial Writergate by brabel on Friday July 04, 2025 @02:33AM (#44461708)
I 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??
Re:Zig breaking change – initial Writergate by audunw on Friday July 04, 2025 @03:00AM (#44461832)
This is a standard library change, not a syntax change

I think the main big thing that’s left for 1.0 is to resurrect async/await.. and that’s a huge thing because arguably very few if any language has gotten that truly right.

As the PR description mentions: “This is part of a series of changes leading up to "I/O as an Interface" and Async/Await Resurrection.”

So this work is partially related to getting async/await right. And getting IO right is a very important part of that.

I think it’s a good idea for Zig to try to avoid a Python 3 situation after they reach 1.0. The project seems fairly focused to me, but they’re trying to solve some difficult problems. And they spend more time working on the compiler and compiler infrastructure than other languages, which is also good. Working on their own backend is actually critical for the language itself, because part of what’s holding Zig back from doing async right is limitations and flaws in LLVM

Re:Zig breaking change – initial Writergate by travisgriggs on Friday July 04, 2025 @03:57AM (#44462237)
> I think the main big thing that’s left for 1.0 is to resurrect async/await.. and that’s a huge thing because arguably very few if any language has gotten that truly right.

Interesting. I like Zig. I dabble periodically. I’m hoping that maturity and our next generation ag tech device in a few years might intersect.

Throwing another colored function debacle in a language, replete with yet another round of the familiar but defined slightly differently keywords, would be a big turn off for me. I don’t even know if Grand Central Dispatch counts, but it—and of course Elixir/Erlang—are the only two “on beyond closures/callbacks” asynch system I’ve found worked well.

Re:Zig breaking change – initial Writergate by messe on Friday July 04, 2025 @04:06AM (#44462297)
As far as I know, Zig still wants their implementation of async to avoid function colouring.
Re:Zig breaking change – initial Writergate by stratts on Friday July 04, 2025 @06:14AM (#44463132)
My understanding is that the current plans are to implement async in userspace, as part of a broader IO overhaul.

This would involve removing async/await as keywords from the language.

Re:Zig breaking change – initial Writergate by throwawaymaths on Friday July 04, 2025 @07:59AM (#44463761)
part of function coloring is "not being trivially resolvable". in this case the function coloring boundary is trivially resolvable.

    const pick_a_global_io = ...;

    fn needs_io(io:IO) void {...}

    fn doesnt_take_io() void {
       needs_io(pick_a_global_io);
    }

easy peasy. you've resolved the coloring boundary.

now, if you want to be a library writer, yeah, you have to color your functions if you don't want to be an asshole, but for the 95% use case this is not function coloring.

Re:Zig breaking change – initial Writergate by dosshell on Friday July 04, 2025 @03:10AM (#44461905)
>> because part of what’s holding Zig back from doing async right is limitations and flaws in LLVM

this was interesting! Do you have a link or something to be able to read about it?

Re:Zig breaking change – initial Writergate by audunw on Friday July 04, 2025 @03:32AM (#44462067)
Much of the discussion is buried in the various GitHub issues related to async. I found something of a summary in this Reddit comment

https://www.reddit.com/r/Zig/comments/1d66gtp/comment/l6umbt...

Re:Zig breaking change – initial Writergate by throwawaymaths on Friday July 04, 2025 @07:50AM (#44463710)
iirc the llvm async operation does heap allocations?
Re:Zig breaking change – initial Writergate by thelastbender12 on Friday July 04, 2025 @03:13AM (#44461929)
Sorry, I think this comparison is just unfair. Odin might have "shipped" but are there are any projects with significant usage built on it? I can count at least 3 with Zig - Ghostty, Tigerbeetle, and Bun.

Programming languages which do get used are always in flux, for good reason - python is still undergoing major changes (free-threading, immutability, and others), and I'm grateful for it.

Re:Zig breaking change – initial Writergate by LukaD on Friday July 04, 2025 @03:16AM (#44461960)
All the JangaFX products (such as EmberGen) are written in Odin.
Re:Zig breaking change – initial Writergate by thelastbender12 on Friday July 04, 2025 @03:39AM (#44462113)
Thank you, my bad - I wasn't aware.

I still think what drives languages to continuously make changes is the focus on developer UX, or at least the intent to make it better. So, PLs with more developers will always keep evolving.

Re:Zig breaking change – initial Writergate by dismalaf on Friday July 04, 2025 @03:42AM (#44462133)
> Odin might have "shipped" but are there are any projects with significant usage built on it?

JangaFX stuff is written in Odin and has some pretty big users.

https://jangafx.com/ https://odin-lang.org/showcase/

Re:Zig breaking change – initial Writergate by kuon on Friday July 04, 2025 @02:40AM (#44461743)
I'd say it is taking some serious design decision for like the 30 years to come, so I am happy it breaks things now.

I wish it moved to snake_case for functions, this is a cosmetic detail but it drives me crazy.

Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @03:01AM (#44461841)
If I look to how I was programming in 1986, and how I am programming now, it is too much hope to have such a design goal, especially since most likely there is little Zig has to add to quantum and AI based systems.
Re:Zig breaking change – initial Writergate by lionkor on Friday July 04, 2025 @03:11AM (#44461915)
This feels out of touch with the actual industry today.
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @03:57AM (#44462234)
Out of touch is assuming that a programming language with zero touch points with AI tooling is going to be relevant in a AI driven industry.
Re:Zig breaking change – initial Writergate by lionkor on Friday July 04, 2025 @06:42AM (#44463309)
What is "AI tooling"?
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @07:27AM (#44463556)
Ask Chat GPT, Claude or Gemini.
Re:Zig breaking change – initial Writergate by cornstalks on Friday July 04, 2025 @02:43AM (#44461761)
I’m glad they are taking their time. They’ve made solid improvements and I don’t think get the sense that they’re paralyzed with perfectionism.

They’re not rushing, that’s for sure. But I’ve never felt worried about 1.0 never happening in an unending pursuit of unrealistic impossible ideals.

Re:Zig breaking change – initial Writergate by vendiddy on Friday July 04, 2025 @03:39AM (#44462112)
They've been pretty explicit about their goals in not settling for a local optimum in the language and taking their time.

It seems like folks expect stability pre 1.0.

Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @02:59AM (#44461828)
Looks like it, while at the same time still lacks any killer application that would make learning Zig a requirement, regardless of one's opinion on the language, like it already happened with many others now in mainstream.

So where is Zig's OS, browser, docker, engine, security, whatever XYZ, that would make having Zig on the toolbox a requirement?

I don't see Bun nor Tiger Beetle being that app.

Re:Zig breaking change – initial Writergate by lionkor on Friday July 04, 2025 @03:12AM (#44461925)
The killer application case is slow adoption inside ancient C and C++ codebases. That's the angle.
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @03:55AM (#44462227)
It hardly brings anything new to the table in such cases, given its approach to safety.

Most of it you can already get in C and C++, by using the tools that have in the market for the last 30 years.

Re:Zig breaking change – initial Writergate by lewdwig on Friday July 04, 2025 @04:37AM (#44462478)
And yet C/C++ developers have mostly spent the last 30 years not using those tools which is why safer successors to C and C++ appeared.
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @07:29AM (#44463562)
Zig is as safe as Modula-2 or Object Pascal, not the turning point of something like Swift or Rust.
Re:Zig breaking change – initial Writergate by detaro on Friday July 04, 2025 @04:41AM (#44462505)
I think pjmlps point is that Zig is not adding enough to be one of those safer successors.
Re:Zig breaking change – initial Writergate by lionkor on Friday July 04, 2025 @06:42AM (#44463307)
It brings a lot of nice features, the potential for a healthier ecosystem, a unified build system, explicit allocators, explicit casts, and so on.
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @07:30AM (#44463569)
Ecosystems sell languages, not the other way around.
Re:Zig breaking change – initial Writergate by lionkor on Friday July 04, 2025 @07:02PM (#44468664)
Yes, and you can use Zig in the C and C++ ecosystems, that's my point
Re:Zig breaking change – initial Writergate by pjmlp on Saturday July 05, 2025 @06:00AM (#44471514)
For what though, what is the selling point to have IT accept it on the allowed toolchains.
Re:Zig breaking change – initial Writergate by dgb23 on Friday July 04, 2025 @05:23AM (#44462794)
Not a killer app, but I think one thing you might consider is zig build.
Re:Zig breaking change – initial Writergate by pjmlp on Friday July 04, 2025 @07:31AM (#44463572)
Not a seller to me.
Re:Zig breaking change – initial Writergate by silisili on Friday July 04, 2025 @02:39AM (#44461733)
That'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.

Re:Zig breaking change – initial Writergate by Laremere on Friday July 04, 2025 @03:20AM (#44461986)
The 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.
Re:Zig breaking change – initial Writergate by silisili on Friday July 04, 2025 @03:24AM (#44462005)
I 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.

Re:Zig breaking change – initial Writergate by lewdwig on Friday July 04, 2025 @04:42AM (#44462516)
Structured concurrency is a notoriously hard problem. This is part of Zig’s 4th attempt to get it right.
Re:Zig breaking change – initial Writergate by raincole on Friday July 04, 2025 @06:47AM (#44463325)
Rust will be (already became?) as complex as C++, if not more. Zig will be as complex as early rust. It's like a force of nature.
Re:Zig breaking change – initial Writergate by tialaramex on Friday July 04, 2025 @10:32AM (#44464910)
How do you figure Rust is "as complex as C++" ?
Re:Zig breaking change – initial Writergate by pjmlp on Saturday July 05, 2025 @08:17AM (#44472271)
I guess, two macro systems, ML type system, affine types, crates using nightly features, having a hard time keeping up with every six weeks feature drops.
Re:Zig breaking change – initial Writergate by tialaramex on Sunday July 06, 2025 @10:51AM (#44481251)
I get two macro systems, but a coherent type system seems simpler to understand. The existence of "regular void" proposals seems to underscore that the "easy" C type system's incoherence doesn't end up being easy to work with or reason about.

And I don't see "crates using nightly features" as somehow a language complexity. Are we counting "Three different compilers with their own quirks" as a C++ complexity? Nor is the six week cadence a complexity. When naked functions stabilized a handful of people went "Hooray" and nearly everybody else doesn't care. And that's not even a feature in standard C++. You have to go read your vendor instructions and do it separately each time. "Yay!".

Re:Zig breaking change – initial Writergate by pjmlp on Sunday July 06, 2025 @11:15AM (#44481437)
I like both languages, those are the issues where I see someone looking from outside and having such complexity claim as the OP.

The ecosystem is part of what means to use a specific language, though.

Yeah, having to guess what standards and extensions each C and C++ compiler implement, is also an issue with them, and will eventually come to Rust as implementations eventually come up, originally there was only CFront and UNIX System V compilers.

Re:Zig breaking change – initial Writergate by throwawaymaths on Friday July 04, 2025 @08:09AM (#44463821)
the only two new feature syntaxes in about six releases have been multiple iterations in for loops and continue in switches? maybe reified tuple types too (not just implicit) and destructuring tuples.

a few things have been removed, too. and async/suspend/nosuspend/await, usingnamesplace are headed for the woodchipper.

Re:Zig breaking change – initial Writergate by bvrmn on Saturday July 05, 2025 @03:31AM (#44470782)
Odin's IO is quite messy. I have strong feeling it evolved as an adhoc solution to tackle development requirements without much thought. I'm happy Andy wants to fix high level (and very important) interfaces while being in pre 1.0.