> If you start a new project in C, it means you have a very good reason
That does not follow.
If you do it, you ought to have a good reason, but very probably don't. Any reason you thought you had, if you had any at all, argues for C++ instead, because it works anywhere C does, and enables you to choose to use modern methods that are not inherently error-prone.
Whether you do choose to use modern methods, in any non-C language you end up using, is a whole other matter. But at least you can.
Re:strcpy: A niche function you don't need
by tsimionescu on Saturday July 31, 2021 @05:57AM
(#28016781)
There are still platforms with C compilers but no (or very bad) C++ compilers. It's much easier to write a decent C compiler than a C++ one.
The set of such platforms that one might start a new project for is very limited. Maybe, flight computer in a Boeing 737 variant? Betting that has no C compiler. 8051?
The BSDs have supported C++ user-space programs for long enough that "just working" should be well within range.
A new project involving a BSD or Linux kernel subsystem, or PostgreSQL or SQLite component, is a plausible interpretation, where C++ is actually forbidden for wholly non-technical reasons.
If you need to deal with an older codebase, the all-or-nothing approach might not be appropriate - incremental improvements might be a better option. Yes, you will have more problems to deal with initially, but with time the situation will get better.