News for hackers. Stuff that matters.
Re:strcpy: A niche function you don't need by ncmncm on Friday July 30, 2021 @11:06PM (#28014898)
> 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.
Re:strcpy: A niche function you don't need by ncmncm on Saturday July 31, 2021 @05:19PM (#28021649)
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.

Re:strcpy: A niche function you don't need by gnubison on Saturday July 31, 2021 @04:07PM (#28021170)
Yeah. If you want your code to “just work” on stuff like the BSDs, then C (or an interpreter written in C) is still your best bet.