by rtpg · 7y ago · 0 comments
I know my phone won’t follow me magically out the door, I take it with me 99% of the time. I still leave it at home sometimes.
Of course here the “chain my phone to my pants “ solution exists, in the form of linting rules preventing usage of unsafe APIs, and having a safer API that enforces checks (for example a strcat variant that requires reporting the destination container size). Or using checked string libraries instead of raw char*. Not 100% foolproof but could help things.
The biggest difficulty is C’s abstraction ceiling being so low. Hard to do stuff like this without making code much bigger than it already is
No comments yet.