4 ms·
I specifically mentioned Misra standards for writing safe C. And ensuring thread safety is not just a C Lang pitfall. I was not looking for language reference
by potato-peeler 1y ago
I specifically mentioned Misra standards for writing safe C. And ensuring thread safety is not just a C Lang pitfall.
I was not looking for language reference rather how current software written in C ensure memory safety. How do their development paradigm look like?
Teaching both the software pitfalls in C and how to mitigate them, maybe by giving examples from modern software or standards like Misra, will really help someone to understand how to write better C. Just linking a language reference does not help.
- atiedebee 1y agoI misunderstood the question then, since I thought it was about learning about the newer language features. C coding standards differ quite a lot, and unfortunately I can't point out any software that has standards developed for safety. As to still try and be helpful: I've enjoyed reading nullprograms blog[0] where he looks into interesting ways to make C more useable (although he tends to replace the entire standard library for reasons highlighted here[1]) There is some must avoid functions (mostly string functions) and a good list of them has been compiled in the git project repository[2]. I've tried looking up the misra C guidelines but they were hard to find or (if I remember correctly) had to be paid for or something like that [0] https://nullprogram.com https://nullprogram.com [1] https://nullprogram.com/blog/2023/02/11/ https://nullprogram.com/blog/2023/02/11/ [2] https://github.com/git/git/blob/master/banned.h https://github.com/git/git/blob/master/banned.h