[erlang-questions] Fwd: [erlang-bugs] Incorrect scope for a variable

nox <>
Fri Feb 18 20:09:02 CET 2011


What I see there isn't an additional indentation level, but one very long variable assignement written twice; that's harder to digest for my taste, but I do understand your point.

Le 18 févr. 2011 à 13:03, Attila Rajmund Nohl a écrit :

> Hello!
> 
> See this example:
> 
> case foo() of
>    x -> bar(),
>        SomeLongVariableName=12;
>    _Else -> baz(),
>        SomeLongVariableName=13
> end,
> 
> That's 6 lines and 2 indentations.
> 
> SomeLongVariableName =
>    case foo() of
>        x -> bar(),
>            12;
>        _Else -> baz(),
>            13
>    end,
> 
> This is 7 lines, 3 indentations, plus strange looking constant numbers
> on their own in a line. If two cases are nested, this latter style
> quickly goes out of the bounds at the right side of the window...
> Still, it's better then the first.
> 
> 2011/2/18, nox <>:
>> I don't understand why would you find it more compact. Can't you just bind
>> case result?
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
> 

--
Anthony Ramine
Dev:Extend
http://dev-extend.eu






More information about the erlang-questions mailing list