4 ms·
One thing an old school C programmer would not do is neglect to put parens around their blocks.
by blikdak 9y ago
One thing an old school C programmer would not do is neglect to put parens around their blocks.
- enriquto 9y agoOn the contrary! We force all our blocks to consist of a single statement so that we can always omit the damn parens.
- kqr 9y agoAre you saying you need statements in your loop blocks!? I just added this to a school assignment: for (String next = in.readLine(); next != null && dictionary.add(next); next = in.readLine()); ...you can sense my contempt for this assignment. I would of course never do this in a real program.
- kbob 9y agoRitchie is the person who made the decision to make curlies optional in C. That's strong evidence he wouldn't add extraneous curlies to his code.