couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Touzet <jo...@atypical.net>
Subject Re: [DISCUSS] Erlang whitespace standards (was: [POLL])
Date Fri, 04 Apr 2014 05:31:12 GMT
I wanted to include this additional bit of info from Paul on the
list, but I didn't feel it belonged in the initial post.

Paul linked me to:

    https://github.com/basho/riak_test/blob/master/src/rt.erl#L587-L597

as something he finds an egregious example of paren-style indenting
being a huge waste of space (and easily exceeding 80 columns).

He offered two solutions to this. The first retains the fun(_) definition
inline, but indents the body a further 4 spaces from the ?assertEqual
definition. The latter, which I think most of us could agree on, goes
so far as to pull the anonymous function out into its own assignment,
then uses that to compactify the code.

    https://gist.github.com/davisp/8665dd5ca023b5da8f24

Hopefully this is a good discussion point for the impending paren vs.
4-space debate.

-Joan

Mime
View raw message