Most active commenters
  • pjmlp(10)
  • lionkor(5)
  • throwawaymaths(3)

←back to thread

228 points Retro_Dev | 43 comments | | HN request time: 2.162s | source | bottom
1. brabel ◴[] No.44461708[source]
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??
replies(7): >>44461733 #>>44461743 #>>44461761 #>>44461828 #>>44461832 #>>44461929 #>>44470782 #
2. silisili ◴[] No.44461733[source]
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.

replies(3): >>44461986 #>>44463325 #>>44463821 #
3. kuon ◴[] No.44461743[source]
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.

replies(1): >>44461841 #
4. cornstalks ◴[] No.44461761[source]
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.

replies(1): >>44462112 #
5. pjmlp ◴[] No.44461828[source]
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.

replies(2): >>44461925 #>>44462794 #
6. audunw ◴[] No.44461832[source]
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

replies(2): >>44461905 #>>44462237 #
7. pjmlp ◴[] No.44461841[source]
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.
replies(1): >>44461915 #
8. dosshell ◴[] No.44461905[source]
>> 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?

replies(2): >>44462067 #>>44463710 #
9. lionkor ◴[] No.44461915{3}[source]
This feels out of touch with the actual industry today.
replies(1): >>44462234 #
10. lionkor ◴[] No.44461925[source]
The killer application case is slow adoption inside ancient C and C++ codebases. That's the angle.
replies(1): >>44462227 #
11. thelastbender12 ◴[] No.44461929[source]
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.

replies(2): >>44461960 #>>44462133 #
12. LukaD ◴[] No.44461960[source]
All the JangaFX products (such as EmberGen) are written in Odin.
replies(1): >>44462113 #
13. Laremere ◴[] No.44461986[source]
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.
replies(1): >>44462005 #
14. silisili ◴[] No.44462005{3}[source]
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.

replies(1): >>44462516 #
15. audunw ◴[] No.44462067{3}[source]
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...

16. vendiddy ◴[] No.44462112[source]
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.

17. thelastbender12 ◴[] No.44462113{3}[source]
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.

18. dismalaf ◴[] No.44462133[source]
> 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/

19. pjmlp ◴[] No.44462227{3}[source]
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.

replies(2): >>44462478 #>>44463307 #
20. pjmlp ◴[] No.44462234{4}[source]
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.
replies(1): >>44463309 #
21. travisgriggs ◴[] No.44462237[source]
> 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.

replies(3): >>44462297 #>>44463132 #>>44463761 #
22. messe ◴[] No.44462297{3}[source]
As far as I know, Zig still wants their implementation of async to avoid function colouring.
23. lewdwig ◴[] No.44462478{4}[source]
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.
replies(2): >>44462505 #>>44463562 #
24. detaro ◴[] No.44462505{5}[source]
I think pjmlps point is that Zig is not adding enough to be one of those safer successors.
25. lewdwig ◴[] No.44462516{4}[source]
Structured concurrency is a notoriously hard problem. This is part of Zig’s 4th attempt to get it right.
26. dgb23 ◴[] No.44462794[source]
Not a killer app, but I think one thing you might consider is zig build.
replies(1): >>44463572 #
27. stratts ◴[] No.44463132{3}[source]
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.

28. lionkor ◴[] No.44463307{4}[source]
It brings a lot of nice features, the potential for a healthier ecosystem, a unified build system, explicit allocators, explicit casts, and so on.
replies(1): >>44463569 #
29. lionkor ◴[] No.44463309{5}[source]
What is "AI tooling"?
replies(1): >>44463556 #
30. raincole ◴[] No.44463325[source]
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.
replies(1): >>44464910 #
31. pjmlp ◴[] No.44463556{6}[source]
Ask Chat GPT, Claude or Gemini.
32. pjmlp ◴[] No.44463562{5}[source]
Zig is as safe as Modula-2 or Object Pascal, not the turning point of something like Swift or Rust.
33. pjmlp ◴[] No.44463569{5}[source]
Ecosystems sell languages, not the other way around.
replies(1): >>44468664 #
34. pjmlp ◴[] No.44463572{3}[source]
Not a seller to me.
35. throwawaymaths ◴[] No.44463710{3}[source]
iirc the llvm async operation does heap allocations?
36. throwawaymaths ◴[] No.44463761{3}[source]
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.

37. throwawaymaths ◴[] No.44463821[source]
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.

38. tialaramex ◴[] No.44464910{3}[source]
How do you figure Rust is "as complex as C++" ?
replies(1): >>44472271 #
39. lionkor ◴[] No.44468664{6}[source]
Yes, and you can use Zig in the C and C++ ecosystems, that's my point
replies(1): >>44471514 #
40. bvrmn ◴[] No.44470782[source]
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.
41. pjmlp ◴[] No.44471514{7}[source]
For what though, what is the selling point to have IT accept it on the allowed toolchains.
replies(1): >>44472194 #
42. ◴[] No.44472194{8}[source]
43. pjmlp ◴[] No.44472271{4}[source]
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.