News for hackers. Stuff that matters.
Re:“No-else-after-return” considered harmful by philwelch on Sunday August 30, 2009 @11:07PM (#795343)
The ternary operator is perfectly readable if you spend even the slightest amount of time getting used to it.

I like spacing my parens too, but what you wrote isn't as readable to me as:

  ( (y > x) || (x < 10) )
Spacing inside your terminal pair of parens only makes your atomic expressions harder to read.

I also like multiline expressions:

  if (  (x == 10) ||
        (y == 10) ||
        (x > y) )
  {
    .....
  }
Re:“No-else-after-return” considered harmful by anamax on Monday August 31, 2009 @03:45AM (#795579)
Why do you put the operators for multiline expressions at the end of the preceeding line instead of at the beginning of the next line?

With statements, the first token on the line tells you what it's doing and the indentation tells you about its relationship to statement on the previous line. Why not do something similar for multi-line expressions?

Re:“No-else-after-return” considered harmful by philwelch on Monday August 31, 2009 @11:48AM (#796143)
I like aligning the atomic conditional tests I'm or'ing together, and that's the most space-efficient way to do it. I guess I could indent the first line more and put the or operators on the left, though.