Comment by Luker88

1 day ago

> C is valuable because it’s simple

This is funny to me because just today some friends gave me a link to a C quiz:

https://stefansf.de/c-quiz/

From which I gathered that it is a much more cursed language than I remembered. Maybe we all just got used to C and just happen to use a minimal subset.

The problems with C are not mainly with the standard library, but any effort to improve things should be lauded.

The quiz is not entirely accurate though. For example, pointers to the same address must compare equal. Other stuff is ancient and some of it was already removed in C23. Again other things are entirely irrelevant in practice and kept only for backwards compatibility or for specific technical reasons. In practice, C is very simple, at least compared to the alternatives.

  • There is an explanation for every one of them, the pointer equality one has code, too.

    try it with `gcc -O1` and you will get a different result than with `gcc -O0`

There's C the standard, and there's C the implementation (compiler & platform). The standard is nice to have on a bookshelf, but your main reference should be the implementation.