Hacker News new | ask | show | jobs
by lakwn 4512 days ago
To me it's really a matter of symmetry. Having lines of code that do similar things look aligned is readable and beautiful.

Hence in Ruby, for example, I love how the "case" statement makes it easy for several conditions to be aligned:

  case
  when a == 0
  when b == 0
  end
In C++, "a == 0" and "b == 0" don't align:

  if (a == 0)
  {
  }
  else if (b == 0)
  {
  }
Now imagine that on a much wider scale. With variable-width fonts the only thing that would ever align would be the beginning of lines. A visual nightmare that affects readability.