I feel like it's worthless to keep up with Zig until they reach 1.0.

That thing, right here, is probably going to be rewritten 5 times and what not.

If you are actively using Zig (for some reasons?), I guess it's a great news, but for the Grand Majority of the devs in here, it's like an announcement that it's raining in Kuldîga...

So m'yeah. I was following Zig for a while, but I just don't think I am going to see a 1.0 release in my lifetime.

To each his own, but while I can certainly understand the hesitancy of an architect to pick Zig for a project that is projected to hit 100k+ lines of code, I really think you're missing out. There is a business case to using Zig today.

True in general but in the cloud especially, saving server resources can make a significant impact on the bottom line. There are not nearly enough performance engineers who understand how to take inefficient systems and make improvements to move towards theoretical maximum efficiency. When the system is written in an inefficient language like Python or Node, fundamentally, you have no choice but to start to move the hotpath behind FFI and drop down to a systems language. At that point your choices are basically C, C++, Rust, or Zig. Of the four choices, Zig today is already simplest to learn, with fewer footguns, easier to work with, easier to read and write, and easier to test. And you're not going to write 100k LOC of optimized hotpath code. And when you understand the cost savings involved in reducing your compute needs by sometimes more than 90% by getting the hotpath optimized, you understand that there is very much indeed a business case to learning Zig today.

IME Zig's breaking changes are quite manageable for a lot of application types since most of the breakage these days happens in the stdlib and not in the language. And if you just want do read and write files, the highlevel file-io interfaces are nearly identical, they just moved to a different namespace and now require a std.Io pointer to be passed in.

And tbh, I take a 'living' language any day over a language that's ossified because of strict backward compatibility requirements. When updating a 3rd-party dependency to a new major version it's also expected that the code needs to be fixed (except in Zig those breaking changes are in the minor versions, but for 0.x that's also expected).

I actually hope that even after 1.x, Zig will have a strategy to keep the stdlib lean by aggressively removing deprecated interfaces (maybe via separate stdlib interface versions, e.g. `const std = @import("std/v1");`, those versions could be slim compatibility wrappers around a single core stdlib implementation.

  • pron
  • ·
  • 1 hour ago
  • ·
  • [ - ]
> I take a 'living' language any day over of a language that's ossified because of strict backward compatibility requirements

Maybe you would, but >95% of serious projects wouldn't. The typical lifetime of a codebase intended for a lasting application is over 15 or 20 years (in industrial control or aerospace, where low-level languages are commonly used, codebases typically last for over 30 years), and while such changes are manageable early on, they become less so over time.

You say "strict" as if it were out of some kind of stubborn princple, where in fact backward compatibility is one of the things people who write "serious" software want most. Backward compatibility is so popular that at some point it's hard to find any feature that is in high-enough demand to justify breaking it. Even in established languages there's always a group of people who want somethng badly enough they don't mind breaking compatibility for it, but they're almost always a rather small minority. Furthermore, a good record of preserving compatibility in the past makes a language more attractive even for greenfield projects written by people who care about backward compatibility, who, in "serious" software, make up the majority. When you pick a language for such a project, the expectation of how the language will evolve over the next 20 years is a major concern on day one (a startup might not care, but most such software is not written by startups).

> The typical lifetime of a codebase intended for a lasting application is over 15 or 20 years (in industrial control or aerospace).

Either those applications are actively maintained, or they aren't. Part of the active maintenance is to decide whether to upgrade to a new compiler toolchain version (e.g. when in doubt, "never change a running system"), old compiler toolchains won't suddenly stop working.

FWIW, trying to build a 20 or 30 year old C or C++ application in a modern compiler also isn't exactly trivial, depending on the complexity of the code base (especially when there's UB lurking in the code, or the code depends on specific compiler bugs to be present - e.g. changing anything in a project setup always comes with risks attached).

  • pron
  • ·
  • 1 hour ago
  • ·
  • [ - ]
> Part of the active maintenance is to decide whether to upgrade to a new compiler toolchain version

Of course, but you want to make that as easy as you can. Compatibility is never binary (which is why I hate semantic versioning), but you should strive for the greatest compatibility for the greatest portion of users.

> FWIW, trying to build a 20 or 30 year old C or C++ application in a modern compiler also isn't exactly trivial

I know that well (especially for C++; in C the situation is somewhat different), and the backward compatibility of C++ compilers leaves much to be desired.

You could fix versions, and probably should. However willful disregard of prior interfaces encourages developers code to follow suit.

It’s not like Clojure or Common Lisp, where a decades old software still runs, mostly unmodified, the same today, any changes mainly being code written for a different environment or even compiler implementation. This is largely because they take breaking user code way more seriously. Alot of code written in these languages seem to have similar timelessness too. Software can be “done”.

I would also add that Rust manages this very well. Editions let you do breaking changes without actually breaking any code, since any package (crate) needs to specify the edition it uses. So when in 30 years you're writing code in Rust 2055, you can still import a crate that hasn't been updated since 2015 :)
Unfortunately editions don't allow breaking changes in the standard library, because Rust codes written in different "editions" must be allowed to interoperate freely even within a single build. The resulting constraint is roughly similar to that of never ever breaking ABI in C++.
I really love Zig the language, but I'm distancing myself from the stdlib. I dislike the breakage, but I also started questioning the quality of the code recently. I was working on an alternative I/O framework for Zig over the last months, and I was finding many problems that eventually led to me trying to not depend on stdlib at all. Even on the code announced here, the context switching assembly is wrong, it doesn't mark all necessary registers as clobbered. I mentioned this several times to the guys. The fact that it's still unchanged just shows me lack of testing.
For what it's worth, Bun is written in Zig (https://bun.sh/). The language isn't exactly in an early stage.
Oh but it is.
Oh but it isn’t.
They just did a massive reactor that broke nearly 100% of existing code. Only an early language can do that.
  • steeve
  • ·
  • 47 minutes ago
  • ·
  • [ - ]
we (ZML) have been back to following Zig master since std.Io was introduced. It's not that bad tbh. Also most changes really feel like actual improvements to the language on a day to day basis.
No shame in waiting for 1.0. Specially if you want to read docs rather than the code itself.
> but for the Grand Majority of the devs in here, it's like an announcement that it's raining in Kuldîga...

Lol, I’ll borrow this.

  • pygy_
  • ·
  • 3 hours ago
  • ·
  • [ - ]
I wouldn't have expected graphic sex slang to be acceptable as a NH user name.

This would translate as ~"eats pussy", where "broûter" is a verb reserved for animals feeding on grass, implying a hefty bush.

An AI will be able to handle updating your code for 95% of your breaking changes
No it won't.

LLMs are good at dealing with things they've seen before, not at novel things.

When novel things arise, you will either have to burn a shed ton of tokens on "reasoning", hand hold them (so you're doing advanced find and replace in this example, where you have to be incredibly precise and detailed about your language, to the point it might be quicker to just make the changes), or you have to wait until the next trained model that has seen the new pattern emerges, or quite often, all of the above.

Just have to wait a few months until a new model with updated pretrained knowledge comes out.
Or spend those few months doing the update :-)
Pretty typical jaded HN comment there, chief. "This language's churn is more than I prefer -- why would anyone use it?" If you're not interested, just downvote and move on. Wondering out loud why anyone would actively use it ("for some reasons?") is a lame waste of bytes.
I don't want to be the negative guy, but this is news about two unfinished implementations. There is a lot of work needed for this to be considered done. For example, no networking in the GCD version yet. And as these are being implemented, the interface stops being an interface, the vtable keeps growing, and it's just the current snapshot of what's needed by the std implementations.
  • hu3
  • ·
  • 2 hours ago
  • ·
  • [ - ]
They aknowlege that at the beggining of the post?

> They are now available to tinker with, by constructing one’s application using std.Io.Evented. They should be considered experimental because there is important followup work to be done before they can be used reliably and robustly:

And then they proceed to list 6 important pending work to be done.

It doesn't say "minor" details like networking not being implemented :)
I like Zig, lots of great features that work in unison. However the worry is by the time it reaches v1 Rust will have consumed the space that C/C++ used to. I think it will be a mainstream language though and gain a lot more traction after v1. There is also the issue of will people actually code by then.
That won't happen if there are legitimate reasons why both Mitchell Hashimoto (creator of Ghostty etc.) and Richard Feldman (of Elm fame, creator of Roc-lang) chose Zig over Rust for their work. They both blogged about it

https://tomas-svojanovsky.medium.com/mitchell-hashimoto-go-a...

https://www.youtube.com/watch?v=dJ5-41u-e7k

https://weeklyrust.substack.com/p/why-roc-is-moving-away-fro...

Perhaps there is room for both... via C FFI interop, of course, lol

(C FFI will probably long outlast C itself...)

I think Rust and Zig really don't overlap much when it comes to target audience. E.g. if you're attracted to Rust, you'll probably find Zig terrible (and the other way around).

Rust will also never replace C or C++ in any meaningful way, at best new code gets written in new languages (and Rust being only one among many, and among languages used for new projects will also be C and C++, just maybe not that often).

I think the era of 'pop star languages' is over, the programming language future is highly diverse (and that's a good thing).

  • sgt
  • ·
  • 1 hour ago
  • ·
  • [ - ]
> I think Rust and Zig really don't overlap much when it comes to target audience. E.g. if you're attracted to Rust, you'll probably find Zig terrible (and the other way around).

This is ironic since these two crowds are mostly solving the same type of problems. It's just democrats vs republicans type of split, some of it is just for show and philosophical.

Rust is solving the memory safety problem, Zig is solving the 'idiomatic interop with existing C coding patterns' problem. These couldn't be more different - C-like idiomatic code is generally antithetical to 'safe' modularity since it often relies on tacit global invariants for correct behavior.

Interestingly, Carbon is kinda trying to tackle both at the same time (though starting from C++ in their case) which is a bit of a challenge.

The more compelling scenario is one where the unsafe subset of Rust itself becomes roughly as easy to use as Zig is today, though still with potential challenges wrt. properly interacting with safe code.

That requires literally rethinking every language and standard library facility and asking "is this putting up artificial roadblocks or even invoking straight UB when one tries to use it idiomatically in unsafe contexts?", then coming up with more flexible, more "C like" facilities in that case. It's hard work but quite doable.

  • pron
  • ·
  • 1 hour ago
  • ·
  • [ - ]
> the worry is by the time it reaches v1 Rust will have consumed the space that C/C++ used to

Given that Rust is quite an old language now and its adoption is still so low, I don't think that should be much of a worry, although that doesn't mean Zig will be the option of choice, and not stabilising is certainly not a good sign. At Rust's adoption rate, a language that hasn't been invented yet and that would show a more normal rate of adoption for a popular language could easily overtake it.

> There is also the issue of will people actually code by then.

Now that could be a bigger issue. :)

> Given that Rust is quite an old language now and its adoption is still so low,

So being part of 3 major OS (Windows, Android and now Linux), the big 3 cloud providers having SDKs for the language, used by so much tooling (js + python) and being part of major internet infrastructure means its “slow” adoption then wow…

  • cies
  • ·
  • 2 hours ago
  • ·
  • [ - ]
I don't think Rust is "a better C/C++". It's a new kind of beast. Interesting, but very different.

Zig OTOH is clearly, to me at least (opinion alert), a "better C". It even compiles C!

I expect LLMs to be really good at converting C to Zig.

> There is also the issue of will people actually code by then.

LLMs don't take responsibility. So even if code is generated, a human will have to assess it. I think assessing Zig is easier than assessing C, which gives this language a selling point that holds out in the AI assisted programming future.

I've been coding in Zig for nearly 2 months straight now.

Or should I say, I've not written a single line of Zig because I've been managing AI's coding in Zig.

Turns out Zig is a fantastic language to "centaur" on. (Reference is to "centaur chess" and which is also sort of becoming a term indicating close code design cooperation with an LLM.)

All of that C code that the LLM trained on ends up helping it work out algorithms in Zig, except that Zig has waaaay more safety guarantees and checks. And is often faster compiled code than the equivalent C, which is astonishing.

> I don't think Rust is "a better C/C++". It's a new kind of beast. Interesting, but very different.

The same can be said about Zig's comptime. It's entirely unlike anything C, C++ or Rust has to offer.

> I expect LLMs to be really good at converting C to Zig.

While it's possible to translate C to Zig code - and you don't need an LLM for that, it's a Zig compiler/build-system feature - the result will be quite different from a project that's developed in Zig from the ground up since the translation output wouldn't make use of Zig's unique features (and Zig isn't really unique as 'C translation target', C can also be translated to unsafe Rust, or even to Javascript - see early Emscripten versions).

Also, the 'C compatibility' of Zig is implemented via a separate compiler frontend, Rust toolchains could do exactly the same thing by integrating the Clang frontend into the Rust compiler.

Using the same language for compile-time and run-time programming is compelling, but doing it properly requires using the same approaches that dependently typed languages use. Comptime is a bit half baked.
It's not just about writing imperative code that runs at compile time, the actual interesting comptime feature in Zig is that "types are comptime values", e.g. you can inspect types and build new types with regular (comptime) code. This is very different from the template/trait systems in C++ and Rust. What Zig's comptime system is missing is the ability to build functions bodies at comptime (e.g. some sort of comptime AST builder).
"You can inspect types and build new types at compile time" is a key affordance of dependently typed languages.
I wouldn’t worry about that. There’s plenty of software yet to be written, in many languages. If anything, Rust’s success has shown that it’s definitely possible for a new language to succeed if it offers something new.

The other tailwind for Zig is that it’s easier than ever to translate an existing codebase with tests into a new language with AI.

Contrary to the neggies, I am positive in Zigs effort to iterate & improve.

Right now there is no language that is good at io-uring. There are ok offerings, but nothing really has modern async joy that works with uring.

Whoever hammers out a good solution here is going to have a massive leg up. Rust is amazing in so many ways but it has been quite a brutal road to trying to support io-uring ok, and efforts are still a bit primitive, shall we say. If Zig can nail this down that would be fantastic!!

I would way rather Zig keep learning and keep changing, keep making new and better. Than to have it try to appease those who are too conservative for the project, unwilling to accept change and improvement, people focused on stability. It takes a lot of learning to make really good systems, to play with fit and finish. Zig is doing the good work. Imo we ought be thankful.

  • hxtk
  • ·
  • 1 hour ago
  • ·
  • [ - ]
It’s surprising to me how much people seem to want async in low level languages. Async is very nice in Go, but the reason I reach for a language like Zig is to explicitly control those things. I’m happily writing a Zig project right now using libxev as my io_uring abstraction.
But Zig's async is being designed to enable this low-level control.
I’m waiting for the kqueue implementation.
  • ·
  • 3 hours ago
  • ·
  • [ - ]
I like that zig takes freestanding target seriously. And seems like 0.16 becomes even better for freestanding code reusability.
[flagged]
Instead of debating for years (like other languages), zig just tries things out. Worst case you can always rollback changes.

IMO best APIs and designs are those that are battle tested by end users, not won in an argument war during committee meetings.

This makes zig unique. It's fun to use and it stays fresh.

You can always just stay on older version of zig. But if you choose to update to newer version, you get new tools to make your code tidier/faster.

  • pjmlp
  • ·
  • 5 hours ago
  • ·
  • [ - ]
Other languages debate for years, because they have a customer base with important applications into production that don't find funny that their code is broken with experiments.

Zig is years away to become industry relevant, if at all, of course they can experiment all they like.

  • Pay08
  • ·
  • 5 hours ago
  • ·
  • [ - ]
Obviously, that comes with the language being in beta. If you don't want things broken, use a complete language.
It's hard to imagine Zig ever becoming stable and conservative. Even at 10 years old, it's still as beta as ever. At some point the churn becomes part of the culture.

Not a complaint, just an observation. I like that they are trying new things.

  • Pay08
  • ·
  • 4 hours ago
  • ·
  • [ - ]
I wouldn't be so sure about that. I do think there's a bit of scope creep, especially with the LLVM replacement stuff, but I don't think it's bad enough for the language to never come out. Most notable languages have at least one large corporate sponsor behind them, Zig doesn't.
I’m a casual user and the 0.16 changes scare me. I tried multiple attempts now, even with full LLM support to upgrade and the result is just a) painful and b) not very good. I have high doubts that the current IO system of 0.16 will make it for another release given the consequences of their choices.
Here's some advice:

1. if you're a casual user (ie you don't follow the development) don't try incomplete APIs that not even the creators of fully know how they are supposed to work (because they're still tinkering with them) also you can't expect docs until the design is somewhat finalized (which is not yet, fyi)

2. llms don't help when trying to make sense of the above (a feature that is not complete, that has no docs other than some hints in commit messages, that changes every other commit), reserve llms for when things are stable and well documented, otherwise they will just confuse you further.

If you want to try new features before they land in a tagged release, you must engage with the development process at the very least.

> if you're a casual user (ie you don't follow the development) don't try incomplete APIs that not even the creators of fully know how they are supposed to work

Is the completeness of each API formally documented anywhere? Maybe I missed something but it doesn't seem like it is, in which case the only way to know would be to follow what's happening behind the scenes.

> if you're a casual user (ie you don't follow the development) don't try incomplete APIs that not even the creators of fully know how they are supposed to work

From what I can tell pretty much everything can be broken at any point in time. So really the only actual advise here is not to use the language at all which is not reasonable.

> llms don't help when trying to make sense of the above

That has not been my experience. LLMs were what enabled me to upgrade to 0.16 experimentally at all.

> If you want to try new features before they land in a tagged release, you must engage with the development process at the very least.

No, that is unnecessary gatekeeping. 0.16 will become stable at one point and I don't want to wait until then to figure out what will happen. That's not how I used Rust when it was early (I always also tried nightlies) and that line of thinking just generally does not make any sense to me.

The reality is that Zig has very little desire to stabilize at the moment.

  • Pay08
  • ·
  • 2 hours ago
  • ·
  • [ - ]
The flipside of that is that the incomplete API should be in a separate branch until it is ready to be included in a release, so that people can opt in instead of having to keep in mind what parts of the API they aren't supposed to be using. It doesn't seem like you expect the changes to be finalised in time for 0.16.
  • ·
  • 2 hours ago
  • ·
  • [ - ]
I think it benefits the overall ecosystem for them to experiment so other languages can take what works
> Instead of debating for years (like other languages), zig just tries things out.

Many other languages do try things out, they just do it in a separate official channel from the stable release or unofficial extensions. Depending on how many users the language has, that may still be more implementation experience than Zig making all devs try it.

I suspect the actual difference is the final decision making process rather than the trial process. In C++, language extensions are tried out first (implementation experience is a requirement for standard acceptance) but committee debates drag on for years. Whereas Python also requires trial periods outside the stable language but decisions are made much more quickly (even now that there's a steering rather than single BDFL).

This is a great point, and it's actually something I really enjoy that the JVM and Java do nowadays by namespacing the new experimental APIs that you test from release to release and then it's stabilized like that, and becomes broadly available.
> IMO best APIs and designs are those that are battle tested by end users

Battle testing an API however requires time and the API to not constantly change.

> Instead of debating for years (like other languages), zig just tries things out.

Good

> Worst case you can always rollback changes.

No, you cannot. People will leave in masses. In perl they announced experiments with a mandatory use experimental :feature. You couldnt publish modules with those, or else you are at risk.

This made perl exciting and fresh. Python on the other hand constantly broke API's, and had to invent package version locks and "safe" venv's. Which became unsafe of course.

Languages and stdlib are not playgrounds. We see what came out of it with C and C++ with horrible mistakes getting standardized.

I recently ditched zig because of this.

I thought it was stable enough initially but they completely broke fuzz testing feature and didn’t fix it.

Also build system API and some other APIs change and it is super annoying.

Find it much better to use c23 with _BitInt integers and some macros and context passing for error handling.

Also some things like stack traces were broken in small ways in zig. It would report wrong lines in stack traces when compiling with optimizations. Also wasn’t able to cleanly collect stack traces into strings in production build.

It is understandable that breaking APIs is good for development but in most cases new API isn’t that good anyway.

And recently saw they even moved the time/Instant API to some other place too. This kind of thing is just super annoying with seemingly no benefit. Could have left the same API there and re-used it from somewhere else. But no, have to make it “perfect”

It sounds like you expected 1.0 stability from a language that isn't 1.0.

> I thought it was stable enough initially but they completely broke fuzz testing feature and didn’t fix it.

From the 0.14.0 release notes:

> Zig 0.14.0 ships with an integrated fuzzer. It is alpha quality status, which means that using it requires participating in the development process.

How could we possibly have been more explicit?

Fuzzing will be a major component of Zig's testing strategy in the long term, but we clearly haven't had the time to get it into shape yet. But we also didn't claim to have done!

> Also some things like stack traces were broken in small ways in zig. It would report wrong lines in stack traces when compiling with optimizations. Also wasn’t able to cleanly collect stack traces into strings in production build.

I mean, to be fair, most compiled languages can't give you 100% accurate source-level stack traces in release builds. But that aside, we have actually invested quite a lot of effort into std.debug in the 0.16.0 release cycle, and you should now get significantly better and more reliable stack traces on all supported platforms. If you encounter a case where you don't, file a bug.

> And recently saw they even moved the time/Instant API to some other place too. This kind of thing is just super annoying with seemingly no benefit. Could have left the same API there and re-used it from somewhere else. But no, have to make it “perfect”

I acknowledge that API churn can be annoying, but it would be weird not to aim for perfection prior to 1.0.

Makes sense, that is fair.

I was a bit too frustrated with all these changes and zig wasn’t the right choice for my particular use case then.

  • ·
  • 2 hours ago
  • ·
  • [ - ]
This is my favourite way to iterate, but the hard lesson is at some point after trying a bunch of things comes the Big Cleanup (tm). Is that a potential issue for this with Zig?
From my perspective zig doesn't have "big cleanup" upfront. It's removing older features as it goes.

stdlib changes as it wants from version to version. So do language features. Since zig is pre-1.0, zig foundation isn't scared of breaking changes.

  • SSLy
  • ·
  • 5 hours ago
  • ·
  • [ - ]
0.16's IO API changes might be that cleanup.
  • Ygg2
  • ·
  • 5 hours ago
  • ·
  • [ - ]
> Instead of debating for years (like other languages), zig just tries things out.

So did Rust pre-1.0

Stability guarantees are a pain in the neck. You can't just break other people's code willy nilly.

> This makes zig unique. It's fun to use and it stays fresh.

You mean like how Rust tried green threads pre-1.0? Rust gave up this one up because it made runtime too unwieldy for embedded devices.

Just on this point:

> You mean like how Rust tried green threads pre-1.0? Rust gave up this one up because it made runtime too unwieldy for embedded devices.

The idea with making std.Io an interface is that we're not forcing you into using green threads - or OS threads for that matter. You can (and should) bring your own std.Io implementation for embedded targets if you need standard I/O.

  • Ygg2
  • ·
  • 1 hour ago
  • ·
  • [ - ]
Ok. But if your program assumes green threads and spawn like two million of them on target that doesn't support them, then what?

The nice thing about async is that it tells you threads are cheap to spawn. By making everything colourless you implicitly assume everything is green thread.

Rust has stable vs nightly. Nightly tries things and makes no guarantees about future compatibilities. If you need code that builds forever, you stay on stable. There's no reason Zig couldn't have the same.
I have my doubts on Jai, besides being built towards game development, from what I read/watched about it, it has 2 or 3 meta programming capabilities, like comptime, macros, etc it feels too much of the same, also Jai is not built towards correctness or safety, John mentality is that he knows what he is doing, so he doesn’t need those guardrails and he wants instead expressiveness.

Also Jai is like C++ in complexity, while Zig is similar to C, very simple language.

Carbon is vaporware so far, there’s no language that could be used yet, because they first need to solve the C++ interop and fast compilation times, that is what will shape the language, so no one is using it, because it doesn’t exist yet.

>Also Jai is like C++ in complexity, while Zig is similar to C, very simple language.

And most importantly, Zig is aiming at being a C++ replacement with the simplicity of C, it is not trying to replace C.

  • Pay08
  • ·
  • 5 hours ago
  • ·
  • [ - ]
I think you meant to say Jai, not Zig.
  • pjmlp
  • ·
  • 5 hours ago
  • ·
  • [ - ]
Good luck with that, it is basically Modula-2 with C like syntax, and we aren't even getting into the whole ecosystem that it is missing on.

Any C++ or C replacement will need to win the earths of mainstream OS and game console vendors, otherwise it will remain yet another wannabe candidate.

Those have already their own languages, alongside their own C and C++ compilers, and are only now starting to warm up to Rust.

Zig or any other candidate will have a very hard time being considered.

So no one should even try because they will never win over all of the C/C++ crowd so are doomed to fail and forever to be a wannabe? I think Andrew has gone about things in a good way, going back to C and exploiting hindsight, not trying to offer everything as quickly as possible. Extend C but keep C interoperability and do both better than C++ instead of trying to be the next big thing and he goes about it in a very deliberate and calculated way. He may not succeed, but the effort has given us a great deal.
  • pjmlp
  • ·
  • 4 hours ago
  • ·
  • [ - ]
One should try, while being aware of the realities of language adoption.

I disagree Zig is that great deal of a language, it would have been if we were talking about 1990's programming language ecosystem, not in 21st century.

Use-after-free problems should not be something we still need to worry about, when tooling like PurifyPlus trace back to 1992.

I don't think Andrew believes Zig is going kill C or C++, he probably has hope but I think he is aware of the reality. He found a way to make a living on something he was passionate about.

Use-after-free is a fact of life until something kills C, but the realities of language adoption are against that. Zig seems interesting and worthwhile in offering a different perspective on the problem and does it in a way more agreeable than Rust or the like for all those who love C and are adverse to large complex languages. The realities of language adoption are as much for as against Zig, large numbers of people are still getting drawn to C and Zig seems to do a better job addressing why so many are drawn to it than the alternatives.

  • pjmlp
  • ·
  • 3 hours ago
  • ·
  • [ - ]
For that to matter OS vendors that only care about C on their platforms, have to also care about Zig.

Otherwise the only users are going to be the ones happy to do some yak shaving instead of the actual application code with the vendor tools.

It also ignores that C doesn't stand still, the competition is C2y, not C89.

Remember that it was Jai that inspired all these new languages. When you talk about the capabilities like comptime, that's all from Jai and why John no longer does public presentations(as people keep stealing his unfinished ideas).

Your comment about gamedev focus makes no sense as that it the most hardcore segment of all the programming there is. So if a language is good for gamedev, it's good for everything else - with high performance.

I'm still in the GC camp with Go and don't see myself leaving any time soon but Zig is just rust-fugly and takes for ever to complete(it started 10 years ago, mind you). Odin is essentially complete, just lacks official spec. I like it but can' bring myself to use it as it lacks methods and I won' be going back to writing a procedural code like its 2002.

I'm curious to see Jai being released, despite having no use case for it. My initial post is merely about purposefulness, or the lack of, for named programming languages as nowadays John's name will carry more weight than Zig could ever have. so without Zig being 1.0 after a decade, and having no competitive advantage over Jai, it has no chance to survive after Jai is released. As I said, Odin will likely will as it is quite simpler, more niche language. Zig just goes directly against Jai and it will lose.

  • _bohm
  • ·
  • 1 hour ago
  • ·
  • [ - ]
> Remember that it was Jai that inspired all these new languages

You’ve made this claim on here before and when I asked you to substantiate it with a source you were completely unable to.

> When you talk about the capabilities like comptime, that's all from Jai

You really should learn a few new languages if you think that’s remotely true. For example, Lisp macros are the distant ancestors of most metaprogramming techniques, dating from the 60s. But there are many similar techniques that precede Zig comptime and Jai, like D’s mixins and templates, which together have very similar power to comptime. There are also Nim macros which I believe also precede Jai. Even the C preprocessor could probably be considered an inspiration for anyone creating a C competitor before we need to invoke Jai ideas.

> why John no longer does public presentations(as people keep stealing his unfinished ideas)

That's your opinion or you have a source for that?

he said it in a video, i think it was in the recent wookash podcast. although you might fing a short clip of the segment somewhere.
The idea of languages "stealing" ideas from each other is not something anyone building a language cares about. I'll just charitably assume you've completly misinterpreted something he said.
  • Matl
  • ·
  • 4 hours ago
  • ·
  • [ - ]
> Remember that it was Jai that inspired all these new languages.

Not really. Rust was a thing long before Jai.

Not sure why this is being downvoted, Blow started working on Jai in 2014, by which point Rust was already nearing stabilization with 1.0 shipping in 2015.
In fact Rust was specifically discussed as a possible alternative to the C++ status quo in Jon's initial "A Programming Language For Games" talk which roughly marks the inception of his current / upcoming language.
> as nowadays John's name will carry more weight than Zig could ever have.

I'm sorry but Zig has been used to create actual production software for many companies whereas Jai has been used maybe once for a mediocre game.

You sound like you're in a cult
  • WJW
  • ·
  • 5 hours ago
  • ·
  • [ - ]
Kinda weird to blame Zig for not being at 1.0 yet while Jai is still in closed beta after 11 years. Meanwhile Zig is being in used in big-ish projects all over while Jai has... a single game engine? Jai looks cool but it's far far FAR behind and losing ground.
  • pjmlp
  • ·
  • 4 hours ago
  • ·
  • [ - ]
The fallacy of that argument would be if its author would seek adoption, however like Naughty Dog with their Lisp based language, John has no plans to have Jai win world adoption beyone his game engine.
  • WJW
  • ·
  • 3 hours ago
  • ·
  • [ - ]
That may be, but OP tried to claim that

> once Jai comes out, Zig will become obsolete

If Jai is happy to have limited adoption (which is fine), other languages will by definition not be displaced by Jai. That is even if we accept OPs implied point, that Jai is good enough to displace Zig, without further discussion. But even that seems to be rather doubtful.

  • pjmlp
  • ·
  • 3 hours ago
  • ·
  • [ - ]
Agreed, however I also think Zig will be another Coffee Script, PureScript, Elm,...

I advise to revisit HN posts about them.

Sure, but Zig has way more money and people working on it. And Jai has inspired all of these new languages so all they had to do was to steal John's ideas whereas he had to actually think very hard about them and do countless iterations to come to a solid conclusion. He paid the cost, they reaped the benefits. So Zig being 10 years old and unfinished just shows they have no original thought, or a plan for that matter.
  • dmit
  • ·
  • 4 hours ago
  • ·
  • [ - ]
> Jokes aside

Ok ok, good

> once Jai comes out

Dangit! You couldn't even make it to the end of the sentence.

When in comes to programmming languages, I would rather see a language done right after 20 years of development than what we see today with all mainstream languages splatting features and breaking changes without care for overall language conciesness and usability.

See Python 2->3, Rust async traits, Go generics, C++... basically everything.

There are high profile apps written in Zig, Bun (bought by Anthropic) and Ghostty also Uber use it. What apps are written in Jai or Odin.
odin - jangafx’s embergen[1]

jai - thekla’s new game, announced but not yet released —- order of the sinking star[2]

[1]: https://jangafx.com/software/embergen

[2]: https://en.wikipedia.org/wiki/Order_of_the_Sinking_Star

  • Pay08
  • ·
  • 4 hours ago
  • ·
  • [ - ]
That's next to nothing for Jai.
  • 6r17
  • ·
  • 5 hours ago
  • ·
  • [ - ]
I feel like this is doomerism with high bias - i'm sorry but there is nothing founded here ; for all I know ; if Zig is able to put only one good reason to be used - some people will use it and not care - however this is a purely logical statement and I do not know of Zig so I might be blind here.
Being at 0.16 right now does not mean much. From what I gather, he is more focused on the semantics right now and trying to avoid getting bitten by a lack of foresight down the road, as most every language is. Things will probably start moving more quickly as the language solidifies.
  • Ygg2
  • ·
  • 4 hours ago
  • ·
  • [ - ]
Any backwards compatible language will accumulate hindsight errors. It's practically inevitable.
Can you elaborate? Zig has a lot of traction already.
  • pjmlp
  • ·
  • 5 hours ago
  • ·
  • [ - ]
Except for Tiger Beetle customers and the few ones using Bun, what traction?
  • tosh
  • ·
  • 3 hours ago
  • ·
  • [ - ]
  • pjmlp
  • ·
  • 3 hours ago
  • ·
  • [ - ]
Another one to the list, however it hardly sounds like a killer application.
  • pdpi
  • ·
  • 3 hours ago
  • ·
  • [ - ]
It's been my daily driver for close to a year now. It might not be a killer application, but it's certainly enough to prove Zig isn't vapourware.
  • pjmlp
  • ·
  • 1 hour ago
  • ·
  • [ - ]
If that is enough, there are plenty of languages around that fit the bill.
  • pdpi
  • ·
  • 3 hours ago
  • ·
  • [ - ]
Ghostty.
ZML
  • pjmlp
  • ·
  • 4 hours ago
  • ·
  • [ - ]
What is even that? Not bothering to Google for it, which shows how irrelevant it is.
  • dmit
  • ·
  • 4 hours ago
  • ·
  • [ - ]
Good call, for bad reasons.

> At ZML, we are creating exciting AI produ[...]

I've read Bun is just a wrapper, not actual Zig implementation anyway. Also, making a financial database in beta language that constantly changes and breaks is "really smart".
  • dmit
  • ·
  • 4 hours ago
  • ·
  • [ - ]
A wrapper over what?? Bun includes the JavaScriptCore engine for JS evaluation, but it's so much more.

As for financial database concerns, if you're serious about including a project like that in your system, you have thorough correctness and performance testing stages before you commit to it. And once it passes the hurdles, at that point what difference does it make if it's written in a beta language, or a bunch of shell scripts in a trench coat, or whatever.

  • dtf
  • ·
  • 3 hours ago
  • ·
  • [ - ]
You can actually go and read the source yourself [1]. If Bun is "just a wrapper", then surely Node.js and Deno are too?

[1] https://github.com/oven-sh/bun/tree/main/src

  • ·
  • 5 hours ago
  • ·
  • [ - ]
Let it come out before we get to chest beating. We are talking about shipped features in Zig here.
WalterBright reply in 3...2...1...
  • jpnc
  • ·
  • 4 hours ago
  • ·
  • [ - ]
You're right that zig is vaporware - not because of other languages - but because programming is going away entirely.
Haven’t looked into MacOS internals for a while, happy to see they stuck to GCD, great middle ground for parallelisation
  • tosh
  • ·
  • 5 hours ago
  • ·
  • [ - ]
> Both of these are based on userspace stack switching, sometimes called “fibers”, “stackful coroutines”, or “green threads”.
  • ·
  • 5 hours ago
  • ·
  • [ - ]