62 points · by davikrr · 5y ago · 15 comments
Integer conversions, literals, unhygienic macros, inconsistent library, overflows, zero-ended strings are all very very fastidious to work with.
I really hope that Zig will grow up because it seems the best promising alternative to C right now. In 20 years or so it might even get a significant market share... Then it will be the turn of POSIX and by 2100 low level system programming will be fixed
A C compiler is relatively easy to implement and it's easy to follow its output if you care about the assembly. For tasks like that, where you want just a lightweight structured programming language on top of assembly, C is very good in principle.
I just want to leave out idiosyncrasies like its automatic type conversions, Rust is way way overkill (and difficult to implement).
Rust is meant to be a replacement for C++, and even then, even if we acknowledge its many merits and C++'s horrible disadvantages, it will always have the handicap of being "different". You can organically grow your abstractions by moving from Assembly, to C, to C++, all in small steps. Writing something in Rust requires somewhat a bigger, discontinuous, step. Not their fault, but that's the state of the ecosystem.
By the way, GCC will be adding Modula-2 to their frontend mainline.
https://www.phoronix.com/scan.php?page=news_item&px=Modula-2...
It’s always good to hear others experience.
FFS, use C11 or newer. Even if you're writing for consoles and weird microcontrollers, the compilers have mostly caught up.