Hacker News new | ask | show | jobs
by prodigal_erik 3410 days ago
Compiler writers have to use program transformation to do well on benchmarks. Developers who don't prioritize benchmarks probably don't use C, and if they do they really shouldn't, because sacrificing correctness for speed is the only thing C is good for these days.
3 comments

Speed isn't the only reason to use C. I often use C not because it's fast, but because C is by far the simplest mainstream programming language. All these UB warts notwithstanding, no language's interface comes as close as C's to a basic, no-frills register machine.
You don't need speed, but you want to write in a language, which is closest to assembly? Hmm. Interesting view on what is simple.
Maybe we mean different things by the word "simple". What language do you think is simpler than C?
Scheme, ML, Java, Lua...
Yeah, we must have different definitions of simplicity, as I expected.

Just off the top of my head, Java has the following complexities that C lacks: exceptions, garbage collection, class inheritance, generics, and a very large standard library.

What definition of simplicity are you using when you say Java is simpler than C?

In reality, that's why I think that neither Go nor Rust will ever replace C (Maybe C++, Java or Python), because nothing can replace C.

C worked in the 70s, when a naive compiler + asm would work perfectly.

Why though? At the end of the day, both are pretty C-like.
Oh please.