3 ms·
Backwards-incompatible change breaks code. And it may do so silently. And the C standardisers don't really have the political clout to do this. Trying to force
by pjc50 11y ago
Backwards-incompatible change breaks code. And it may do so silently. And the C standardisers don't really have the political clout to do this. Trying to force people to "new C" would be a lot of work and would probably result in a culture split like the backwards-incompatible Perl and Python splits. OpenBSD have managed to move people to strlcpy(), but that's about it.
People are just as likely to migrate to another language (Rust? Go? Even C++) as upgrade the old C code.
- PythonicAlpha 11y agoBut it would be possible to create new functions with new names that supersede the old ones, so that the old stdc-lib will be discontinued silently.
- pjc50 11y ago? Either you discontinue the old functions "noisily", by breaking code that uses them, or they continue to be used.
- PythonicAlpha 11y agoWhen you have good replacements, at least serious developers will use them. Also there are tools to check for compliance. I don't think, that you can discontinue strcpy and co.
- JulianMorrison 11y agoYou add them along side, and you define them as the "modern" standard, and you discourage, but do not forbid, mixing them up. Ideally, there would be no temptation to mix them up in new code, because the new ones would just b better. Including them into old established code (that can't realistically be re-written) is harmless.