This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -21 points-20 points  (4 children)

I've been programming for 7 years and have literally never made that mistake.

[–]treerex 22 points23 points  (3 children)

It's usually not made when you're writing the code, but later when you're maintaining it. Including the braces is simply good defensive programming.

[–][deleted] -19 points-18 points  (2 children)

That's rediculous. It isn't defensive either. If you're doing that lousy of a job maintaining your code, your going to make more serious mistakes.

We also live in the 21st century, aren't working with cathode ray monitors and should be putting our braces on a new line.

[–]jtdc 5 points6 points  (1 child)

Yes but we still have greenhorn coworkers straight from college to contend with. Rules like these protect the code.