[erlang-questions] Controversial subject of the day: tabs and spaces for indentation
Mon Feb 10 23:12:28 CET 2014
On 02/10/2014 11:01 PM, Richard A. O'Keefe wrote:
>> - Mixed tabs and spaces present challenges for programmer using
>> different editors and contributing to projects with varied or poorly
>> defined white space standards
> This is somewhat misleadingly phrased.
> Tabs do this all by themselves.
> For example, I once spent some time using a programming
> language where the IDE on Macs insisted that tabs were
> equivalent to 4 spaces and the Unix command line tools
> insisted that tabs were and could only be equivalent to
> 8 spaces, AND the language was indentation-sensitive.
> So remember, it's not "mixed tabs and spaces present
> challenges", it's "tabs present challenges".
Tabs are perfectly fine for indentation. You had issues only because you
were doing both indentation *and* alignment. If you don't align your
code, it doesn't matter what the tab length is.
Just like the CAP theorem, I posit the TIA theorem: tabs, indentation,
alignment, choose two.
More information about the erlang-questions