Discussion about this post

User's avatar
Chartertopia's avatar

As a former assembler and C programmer, I'd say there's another obstacle to this simple fix: it's not always necessary. Suppose a program has telephone numbers or postal codes as inputs and verifies them, including length. Checking the length of known data every time it gets passed around is a waste of time.

C is supposed to be simple code, minimalist. Unnecessary redundant length checking goes against that ethos. So what if it takes in-depth study and analysis to verify this; that's what makes C programmers special. They program smart instead of relying on crutches like extra unnecessary arguments or fancy-schmancy languages with built-in redundancy.

No posts

Ready for more?