Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C99 took a while to be widely adopted mainly because some compilers where very slow on the uptake (I'm looking at you Visual C++) but now I would never consider using anything less than that for a new project. It's almost 20 years old!

Many small quality of life improvements: stdint.h stdbool.h, inline, restrict, allowing variable declaration within the code, snprintf, variadic macros...

Most of those were accessible through compiler extensions but having them in the standard means that you know it'll work everywhere on any compliant implementation.

Linux definitely isn't conservative when it comes to the language, not only does it use modern features of the language but it even relies on GCC extensions and even sometimes on the compiler's optimizer to produce the correct code: https://unix.stackexchange.com/questions/153788/linux-cannot...

I'm not super familiar with CPython but it also doesn't appear to limit itself to C89, see for instance this random file I opened: https://github.com/python/cpython/blob/master/Python/future....

You can see that `const char *feature` is declared in the middle of some code. It also uses "inline" in several places.



> I'm looking at you Visual C++

They decided to ditch clang/c2 integration work, and are planning to actually fully support C99 and not only what is required by ANSI C++.

https://www.reddit.com/r/cpp/comments/6mqd2e/why_is_msvc_usu...

https://www.reddit.com/r/cpp/comments/6mqd2e/why_is_msvc_usu...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: