[erlang-questions] Controversial subject of the day: tabs and spaces for indentation

Loïc Hoguin essen@REDACTED
Tue Feb 11 10:53:10 CET 2014


On 02/11/2014 02:17 AM, Richard A. O'Keefe wrote:
> Our message crossed.
>
> On 11/02/2014, at 12:13 PM, Loïc Hoguin wrote:
>>
>> Indentation:
>>
>> myfunction(A, B, C,
>>     D, E) ->
>>
>> Alignment:
>>
>> myfunction(A, B, C,
>>            D, E) ->
>
> I don't call that "alignment", I call that "evil".
> As far as I am concerned, one of the core rules of
> good indentation is
>   - the presence or absence of line breaks will
>     depend on the size of names and constants
>   - but the AMOUNT of indentation never will.
>
> Why?  Because indentation is supposed to reveal
> STRUCTURE, not spelling.

I agree. Unfortunately many people align there.

> I would write this as
>
>      my_function(
>          A, B, C, D, E
>      ) ->

That certainly looks better.

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list