logoalt Hacker News

leni536today at 8:53 AM6 repliesview on HN

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.


Replies

palatatoday at 9:34 AM

> 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.

mjyuttoday at 9:45 AM

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

The key point is, C++ added numerous features to C, and at the time, it was the only language occupying that position (or perhaps Objective-C, too?).

Today, a successor to C cannot simply replicate what C++ did. Add too many features, and it will be viewed as a successor to C++ rather than to C (as is the case with Rust and D). Conversely, keep the additions minimal in order to stay close to C, and you end up in a "red ocean" crowded with Zig, Odin, C3, Hare, Jai, and others.

msdztoday at 11:13 AM

This one struck me in particular as unconvincing:

> The problem is that C have practically no checks, so any safety checks put into the competing language will have a runtime cost, which often is unacceptable.

Why would all possible checks that provide an improvement over C be runtime-only?

jillesvangurptoday at 9:35 AM

> 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).

erutoday at 9:11 AM

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

nicoburnstoday at 9:34 AM

> 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.