[erlang-questions] Different code layout examples

Joe Armstrong erlang@REDACTED
Fri Aug 13 22:44:58 CEST 2010


On Thu, Aug 12, 2010 at 2:30 PM, Brian Williams <mixolyde@REDACTED> wrote:
> Are there any examples out there of different code layouts that may
> (or may not) look better to someone confused by the punctuation?
> Brian
>
> On Thu, Aug 12, 2010 at 3:25 AM, Deryk Barker <dbarker@REDACTED> wrote:
>> Geoffrey Biggs wrote:
>>>
>>> I've never really had the problems that others seem to with Erlang's
>>> punctuation. I've always thought of an Erlang function as like a
>>> sentence. Just like in sentences, you use different punctuation to
>>> separate the different parts. When you see the full stop, the sentence
>>> ends. A single line is not necessarily a single, self-contained
>>> "statement".
>>>
>>
>> Hear, hear!

I agree.

Commas as separators, are pretty common. We write functions calls thusly:

     foo(a,b,c)

and not:

    foo(a,b,c,)

And English clauses,  with a trailing comma at the end of a sentence,
would be very ugly,.

/Joe

>>
>> I've always found (well-laid out) erlang code to be particularly elegant.
>>
>> deryk
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>>
>
>
>
> --
> Brian E. Williams
> mixolyde@REDACTED
> http://www.techhouse.us/wordpress-mu/brianw
>
> "Never attribute to malice that which can be adequately
> explained by stupidity." - Hanlon's Razor
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list