Live data from Hacker News

The case against a C alternative (2022)

c3.handmade.network

1–10 of 84 posts

Re: The case against a C alternative (2022)

#2
Pretty unconvincing arguments overall. Mostly boils down to "any new language will start as new and not mature". Dismisses any "killer feature" in C's design space. Ignores that there is already a well established C alternative: C++.

But obviously nothing will replace C in the sense that C will cease to exist.

Re: The case against a C alternative (2022)

#3
post #2

Pretty unconvincing arguments overall. Mostly boils down to "any new language will start as new and not mature". Dismisses any "killer feature" in C's design space. Ignores that there is already a well established C alternative: C++. But obviously nothing will replace C in the sense that C will cease to exist.

We also have D and Zig and Rust. Or even OCaml or Forth, depending on what you see as essentially about C.

Re: The case against a C alternative (2022)

#5
As with many things, only time will tell.

Zig seems to be most prominent C alternative today, well funded, with some high-profile support, excellent engineering and both a loyal fanbase and haters.

That said, as longtime C user, I've been tempted by Jai and Zig and C3, but I am not ready to make the switch yet. The benefits are simply not big enough.

And there is something new that was not apparent in when this article was written: a lot of code is LLM written now, giving old and mainstream language an undeniable advantage. Also, Rust, with the built-in safeguards, is pretty AI assistance friendly.

Re: The case against a C alternative (2022)

#6
I am guilty in a sense, I started a new programming language called C+ and one of the pillars I set was that it should not be an alternative to C (or any other language), in fact it uses Clang as its compiler, most of the points in the article still hold, but I hope it doesn’t stop people from coming up with new ideas and actually implementing them in this field, you don't have to be next big thing to be awesome

Re: The case against a C alternative (2022)

#7
To me the case against a C alternative is simple. C is like Math. It is the fundamental high level language. There can be no alternative..

Rust made the mistake of thinking it can be low level AND safe. It tried to have the cake and eat it too. That will be its downfall.

Re: The case against a C alternative (2022)

#8
post #2

Pretty unconvincing arguments overall. Mostly boils down to "any new language will start as new and not mature". Dismisses any "killer feature" in C's design space. Ignores that there is already a well established C alternative: C++. But obviously nothing will replace C in the sense that C will cease to exist.

> Ignores that there is already a well established C alternative: C++.

I don't consider C++ an alternative to C.

I see it as "a more modern language", but there are "even more modern" languages nowadays. The only reason I see to pick C++ instead of something like Rust would be if there are very mature C++ libraries and it is not practical to call them from the newer language. Typically for computer vision (or maybe just linear algebra?), I would still go with C++, probably? But in terms of language, I would pick any modern language over C++ if they do the job.

What about C, then? I use C when I want interoperability. Nothing currently beats C in that domain, as far as I know. I often wrap whatever I have into a C interface just for that.

IMHO, the interesting question about "replacing C" is really this: if you had to design a modern language meant to compete with C's interop story, how would it look like? Not sure if such a language could have memory-safety, for instance? Could such a language be meaningfully nicer than C?

Disclaimer: I don't know Zig.

Re: The case against a C alternative (2022)

#9
post #2

Pretty unconvincing arguments overall. Mostly boils down to "any new language will start as new and not mature". Dismisses any "killer feature" in C's design space. Ignores that there is already a well established C alternative: C++. But obviously nothing will replace C in the sense that C will cease to exist.

> obviously nothing will replace C in the sense that C will cease to exist.

Long-term it almost certainly will. But not in our lifetimes, sure.

Re: The case against a C alternative (2022)

#10
post #2

Pretty unconvincing arguments overall. Mostly boils down to "any new language will start as new and not mature". Dismisses any "killer feature" in C's design space. Ignores that there is already a well established C alternative: C++. But obviously nothing will replace C in the sense that C will cease to exist.

> My language (C3) is fairly recent, there are others: Zig, Odin, Jai and older languages like eC. Looking at C++ alternatives there are languages like D, Rust, Nim, Crystal, Beef, Carbon and others.

He acknowledges C++ in the first paragraph ...

He's obviously writing this from the point of view of making a case against what he is doing, which is creating a new language (C3). Interesting perspective considering that this was written just before the LLM hype kicked off. It would be interesting to get an update in that context: why create a new language when AIs are going to be the primary user and what would be killer features for AI coding tools to use? It seems languages like Go and Rust are relatively popular targets for using with such tools. C/C++, not so much (other than for code rewrites in Rust).

Post reply on HN