Comment by Zakis1
11 hours ago
Agreed unfortunately, if Zigs whole selling point is meant to be a "nicer C" (and a much nicer DX than Rust because no fighting the borrow checker etc) - does that really matter in a world where an LLM is writing the code? I am not going to be fighting the borrow checker, the LLM is.
And as always, the response you'll hear is: but AI sucks/hallucinates/could never replace me etc... Just look at the progress LLM'S have made in the past few years, and extrapolate that to the next 10 or 20 years. I don't see how Zig makes sense if this is the trajectory the industry is going.
> Just look at the progress LLM'S have made in the past few years, and extrapolate that to the next 10 or 20 years.
First of all, past trend doesn't predict the future.
And if it did, then the answer would be nothing will matter in 20 years. Not just "no programming language," but nothing.
What does nothing matter mean thou ? The extrapolation is very plausible outcome thou
Why would *any* programming language matter when LLMs can just directly output binaries from a sufficiently detailed spec ;)
And specifically, why would Rust be a better choice than C or Zig when the LLMs get good enough to just write memory safe code in unsafe languages (they are already pretty good at finding memory safety bugs).
IMHO for code generation, different things start to matter (like fast build times, while 'convenient highlevel abstractions' become less important).
Writing memory safe code in unsafe languages requires global reasoning, which LLMs are terrible at. The whole point of a type system or a borrow checker like Rust's is to thread the requirements for safety throughout the program syntax in a way that makes it possible to spot problems locally. That's why LLMs tend to be rather good at writing Rust.
> Writing memory safe code in unsafe languages requires global reasoning
If you learn how to use arena allocators and in general use modern techniques, you don't need global reasoning to write correct memory management code pretty much never.
If your code is a RAII and abstraction maze, then yes, you will probably need global reasoning, but that's not the case with Zig.
1 reply →
Writing anything safe code in any language that doesn't have that safety built in requires global reasoning. That's why LLMs aren't better at writing rm-rf/-safe code in Rust.
Why's everybody obsessed with the popularity contest?
Rust is a great language with some great killer features.
It does not need consistent propaganda preaching how it's a better choice than "insert other language".
Every system programmer is aware of Rust and it's pros. Doesn't mean it's a language that fits the use case, project, constraints and even preferences. It's not just about generating code, it's also about reading it and maintaining it.
Thus some people just prefer alternatives, be it C, C3, Odin, Zig, Jai or whatever else there is.
You said it yourself, it's selling point is "nicer C", so it's for people that don't want to write Rust or C++ but a nicer C.
> It does not need consistent propaganda preaching how it's a better choice than "insert other language".
Indeed. There is an irrational urge in some folks to become language-missionaries. Usually such folks have gained expertise in that specific language and want to protect and expand their turf. There is a wide-range of software usecases requiring a variety of tools and no one language fits all.
Amusing side-note. xai was all-in on rust for their ai-stack back in 2023. But now, spacex controlled xai is apparently coding ai in C - perhaps with the attitude that if a language is good enough to control rockets it is good for ai.
I think it's like this. People think differently. Someone finds a language that really fits the way they think, and it feels wonderful, and they feel like they've been let out of prison into this wonderful new freedom. And they, being empathetic humans, want other people to have the same experience, and they think that others will have the same experience if they just try this wonderful language. So they become language missionaries.
But what they miss is that other people think differently than them. Other people will feel let out of prison by a different language.
Rustaceans tend to be extremely defensive and insecure as a community, overall they are quite toxic. That's the truth.
[dead]