Hacker News new | ask | show | jobs
by pmiller2 3831 days ago
I find it interesting that certain languages (F#, Ruby, Scala) are so polarized against tabs. Some make sense, like Haskell, Go, or Python (and, to an extent, CSS), but the rest kind of baffle me.
2 comments

I interpreted this to indicate a tribal connection. Where Ruby developers have explored and migrated to other languages like Scala and JavaScript their indent preferences have remained. Obviously this is conjecture but one could test the theory to see which users commit to which types of languages to spot some trends.
Example:

  let x = let x = 1
          x + 1
If you use tabs the indentation is broken depending tab size. Some languages prefer needless symbols to do this; I prefer the cleanliness of just whitespace.
The indentation is fine, the alignment is broken. Tab to the indent level and align after that with spaces.
The actual indent level is wherever the second let begins. It's equivalent to:

  let x = 
      let x = 1
      x + 1
Seems inconsistent to have to use a mix of tabs and spaces in different scenarios of visual preference.