logoalt Hacker News

jeroenhdyesterday at 7:55 PM0 repliesview on HN

C sits right in the middle between assembly and BASIC in terms of simplicity. You can't do a simple popcnt, but you can implement jump tables.

It's slower than Fortran and, depending on the platform, cobol. It's a bigger minefield than any language that came after it barring C++.

The only real advantage I can ascribe to C is that it's actually still being used after all these years, and it mostly works similarly on most hardware, like a Java for people who enjoy the casino.

Fixing C without breaking existing C code is pretty much impossible. You can start by defining warnings for UB, but then you will break any of the more trivial examples in the article. You can also start by simply killing off weird platforms (force a specific amount of bits for instance, screw the weird 16 bit char chips). Making casts explicit would probably fix a lot of problems too, though you'd need better syntax for that.

There is no fixing C without changing what C really is.