Closed matthiasbeyer closed 11 years ago
I’m not in favour of pulling this change because I think it doesn’t improve the readability in a significant way. Two remarks that I’d like to give:
then
after an if
is entirely optional and is rarely used in Ruby, so I’d drop that.!
, &&
and ||
are preferred over not
, and
and or
, respectively. The latter have lower operator precedence, which trips up a lot of people.if
s should be flattened and should use elsif
s.Even with these changes, I don’t think it’s much better than the original, so I’d like to keep it that way.
I simplified the nested if-else construct near lib/guard/nanoc.rb#46.