4 ms·
I think for new code in environments that support newer standards C89 shouldn't be used. For the increasingly rare places new C is being written where C89 is th
by cestith 6y ago
I think for new code in environments that support newer standards C89 shouldn't be used. For the increasingly rare places new C is being written where C89 is the latest tooling available and the code handles strings, a safer string library is nearly a must. I strongly recommend a safer string library no matter which standard, but I'm nobody.
When updating existing code C89 (maybe K&R) might be what's used so minor code changes won't undo that.
I tend to write most of my code in something higher-level than C and only resort to C or assembly in performance-critical sections as found with a profiler. Plenty of general-purpose languages have memory-safe strings built into the language, and honestly I keep hoping the Cisco/Intel safestrings library or something like SDS gets the standard library blessing one day.
- DaiPlusPlus 6y ago> I think for new code in environments that support newer standards C89 shouldn't be used Why stop there? Don't use C. Use Rust!
- SAI_Peregrinus 6y agoRust doesn't (yet) support all the targets C does. Mostly weird embedded stuff that needs it, and gccrs might solve that problem, but it's not always possible. When it is possible, I certainly agree that Rust is nicer.