News for hackers. Stuff that matters.
Re:Modern C by pjmlp on Friday September 04, 2020 @04:17AM (#24372859)
Only for historical reasons, it is full of examples of bad practices regarding safe C code by modern standards.
Re:Modern C by Koshkin on Friday September 04, 2020 @08:53AM (#24374447)
But C is “bad practice” (by design, and I mean it in a good sense).
Re:Modern C by pjmlp on Friday September 04, 2020 @09:17AM (#24374644)
Ideally C should be avoided as much as possible outside kernel code.

However it has gotten so deep into IT infrastructure, thanks to the hegemony of UNIX/POSIX clones, that even if starting today no more greenfield software would be written in C, and its copy-paste compatible languages, Objective-C and C++, it would take generations to clean it up and it would never be 100% replaced, as proven by mainframe environments and their languages.

So for the use cases where C isn't going away no matter what, we should strive for newer generations to improve their code quality and not to repeat bad practices from the past.