News for hackers. Stuff that matters.
Re:Those Who Say Code Does Not Matter by byuu on Wednesday April 16, 2014 @04:25PM (#7600329)
That would really start to hurt readability. There are plenty of instances where the body is very similar save for a small change, and having it lined up in a grid makes it much easier to read. As a contrived example, you can look straight down to see the action values here:

if(condition_1) { action(318); }

if(condition_2) { action(219); }

if(condition_3) { action(142); }

In my opinion, the bigger risk is having a single-statement if have its payload on the next line.

if(x.open()) x.close(); //very difficult to add another statement accidentally here

if(x.open())

    x.close();  //much easier to do so here
But of course I wouldn't want to start treating whitespace as special in C.

There are no comments on this comment yet.