[erlang-questions] Controversial subject of the day: tabs and spaces for indentation
Richard A. O'Keefe
ok@REDACTED
Tue Feb 11 00:00:55 CET 2014
On 11/02/2014, at 11:12 AM, Loïc Hoguin wrote:
> On 02/10/2014 11:01 PM, Richard A. O'Keefe wrote:
>>
>> 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.
To the limited extent that I understand the distinction you are
making between "indentation" and "alignment", I don't understand it.
To me, indentation simply *is* "making some aspect of structure
directly visible by mapping nesting depth to distance from the
left margin".
A 'character' which corresponds to an unpredictable and uncontrollable
amount of white space simply isn't up to the job. (Yes, if you put an
Emacs mode line into a file, tab width *is* predictable and controllable
for that file, BUT ONLY IN Emacs.) If you mean that the indentation
will be *logically* correct as far as a parser is concerned, fine.
But it won't be *visually* correct.
By the way, the IDE didn't, for all practical purposes, offer me any
choice in the matter.
More information about the erlang-questions
mailing list