Erlang Style Guide

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang Style Guide

Dmitrii Dimandt-2
Hi all!

Is there a more-or-less universally accepted Erlang Style Guide. SImilar to, say, PEP08 (http://www.python.org/dev/peps/pep-0008/).

If there isn't, does anyone has a style guide the use? Would you care to share you style guides with the list?

Thank you!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

Dmitrii Dimandt-2
This is an excellent guide. However, it mostly deals with language constructs and programming habits. It would be nice to complement this with a "writing style" guide that would discuss identation and nesting, naming conventions etc.



What about this?

http://www.erlang.se/doc/programming_rules.shtml

On Wed, May 18, 2011 at 2:16 PM, Dmitrii Dimandt <[hidden email]> wrote:
Hi all!

Is there a more-or-less universally accepted Erlang Style Guide. SImilar to, say, PEP08 (http://www.python.org/dev/peps/pep-0008/).

If there isn't, does anyone has a style guide the use? Would you care to share you style guides with the list?

Thank you!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



-- 
Regards,
Alexander

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

Joe Armstrong-2


On Wed, May 18, 2011 at 2:39 PM, Dmitrii Dimandt <[hidden email]> wrote:
This is an excellent guide. However, it mostly deals with language constructs and programming habits. It would be nice to complement this with a "writing style" guide that would discuss identation and nesting, naming conventions etc.



Where to put punctuation, naming etc. is a matter that is discussed with religious fervor - nobody agrees
here at all ...

/Joe
 

What about this?

On Wed, May 18, 2011 at 2:16 PM, Dmitrii Dimandt <[hidden email]> wrote:
Hi all!


Is there a more-or-less universally accepted Erlang Style Guide. SImilar to, say, PEP08 (http://www.python.org/dev/peps/pep-0008/).

If there isn't, does anyone has a style guide the use? Would you care to share you style guides with the list?

Thank you!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



-- 
Regards,
Alexander

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

dmercer

I daresay, if ROK would publish his standards, I’d probably follow them.  He’s the guy who puts punctuation at the beginning of a lot of lines.  The way it is now, I just go with what looks good (which means punctuation at the end of the line), because I can’t be bothered coming up with rules to follow, but I’m pretty sure ROK has in his head some self-consistent system that makes sense and makes coding easier.

 

Actually, I’d probably follow anyone’s formatting rules if someone would publish some.  Maybe I should…

 

Cheers,

 

DBM

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joe Armstrong
Sent: Wednesday, May 18, 2011 8:02 AM
To: Dmitrii Dimandt
Cc: Erlang Questions
Subject: Re: [erlang-questions] Erlang Style Guide

 

 

On Wed, May 18, 2011 at 2:39 PM, Dmitrii Dimandt <[hidden email]> wrote:

This is an excellent guide. However, it mostly deals with language constructs and programming habits. It would be nice to complement this with a "writing style" guide that would discuss identation and nesting, naming conventions etc.

 

 


Where to put punctuation, naming etc. is a matter that is discussed with religious fervor - nobody agrees
here at all ...

/Joe
 



What about this?

 

On Wed, May 18, 2011 at 2:16 PM, Dmitrii Dimandt <[hidden email]> wrote:

Hi all!



Is there a more-or-less universally accepted Erlang Style Guide. SImilar to, say, PEP08 (http://www.python.org/dev/peps/pep-0008/).

If there isn't, does anyone has a style guide the use? Would you care to share you style guides with the list?

Thank you!
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions




-- 
Regards,
Alexander


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

 


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

Jack Moffitt
> I daresay, if ROK would publish his standards, I’d probably follow them.
> He’s the guy who puts punctuation at the beginning of a lot of lines.  The
> way it is now, I just go with what looks good (which means punctuation at
> the end of the line), because I can’t be bothered coming up with rules to
> follow, but I’m pretty sure ROK has in his head some self-consistent system
> that makes sense and makes coding easier.

+1 for people publishing these. I don't everyone will agree on a
single set, but having a few of these to point to would help I think.
Is there not an OTP coding guidelines that OTP contributors must
follow?

Currently I let the Emacs mode decide what is best, but I often
disagree with it. I've been considering changing forms like:

Something = case mod:func(Args) of
                        foo ->
                            ok;
                        bar ->
                            not_ok
                  end,

to:

Something = case mod:func(Args) of
    foo ->
        ok;
    bar ->
        not_ok
end,

which is more what I'm used to from JavaScript.

jack.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

Parnell Springmeyer-2
In reply to this post by Dmitrii Dimandt-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It isn't exactly a writing style guide but I did find the Efficiency
Guide extremely useful for learning the common Erlang idioms early on in
my learning curve: http://www.erlang.org/doc/efficiency_guide/introduction.html

Dmitrii Dimandt <[hidden email]> writes:

> This is an excellent guide. However, it mostly deals with language
> constructs and programming habits. It would be nice to complement this
> with a "writing style" guide that would discuss identation and nesting,
> naming conventions etc.
>
>     What about this?
>    
>     http://www.erlang.se/doc/programming_rules.shtml
>    
>     On Wed, May 18, 2011 at 2:16 PM, Dmitrii Dimandt <
>     [hidden email]> wrote:
>    
>         Hi all!
>        
>         Is there a more-or-less universally accepted Erlang Style
>         Guide. SImilar to, say, PEP08 (http://www.python.org/dev/peps/
>         pep-0008/).
>        
>         If there isn't, does anyone has a style guide the use? Would
>         you care to share you style guides with the list?
>        
>         Thank you!
>         _______________________________________________
>         erlang-questions mailing list
>         [hidden email]
>         http://erlang.org/mailman/listinfo/erlang-questions
>
>     --
>     Regards,
>     Alexander
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

- --
Parnell "ixmatus" Springmeyer (http://ixmat.us)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJN0+ZeAAoJEPvtlbpI1POLsRcH/2F6bqInr7RjVW32i9EEEmW3
TYjr/cLGN1ZgJrTqbiujZEvS9xr6ZfXYln8PmziWjLRl8DWuexNguEdegi9keDFA
spTfJzQ3YIkb4oxCv6LlMp/5oNZaLlL/12VfF0rC1cSa7BO97JjpNSjJOSdMpfJF
Sz62d/1qKOuojqxEZYfh31nkLFoVf+b5N0gJw/8DCnSd/ZD+knPo2CeflNYSFKDF
eyBiP/RyRk1bI+T1T+tsCC08ipA02sQm4vllITMM21smeQO8FbYAV25xEOtKr7Ng
Uz6deQl8tbn7QD7j0pQhAYseuT234Kl/zhp3wN1pqMtiqA0SSz7bqPU5byHKMPE=
=O2I1
-----END PGP SIGNATURE-----
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Erlang Style Guide

Toby Thain
In reply to this post by dmercer
On 18/05/11 9:56 AM, David Mercer wrote:
> I daresay, if ROK would publish /his/ standards, I’d probably follow
> them.

Co-signed.

--Toby

> He’s the guy who puts punctuation at the beginning of a lot of
> lines.  The way it is now, I just go with what looks good (which means
> punctuation at the end of the line), because I can’t be bothered coming
> up with rules to follow, but I’m pretty sure ROK has in his head some
> self-consistent system that makes sense and makes coding easier.
>
>  
>
> Actually, I’d probably follow anyone’s formatting rules if someone would
> publish some.  Maybe /I/ should…
>
>  
>
> Cheers,
>
>  
>
> DBM
>
>  
>
> *From:*[hidden email]
> [mailto:[hidden email]] *On Behalf Of *Joe Armstrong
> *Sent:* Wednesday, May 18, 2011 8:02 AM
> *To:* Dmitrii Dimandt
> *Cc:* Erlang Questions
> *Subject:* Re: [erlang-questions] Erlang Style Guide
>
>  
>
>  
>
> On Wed, May 18, 2011 at 2:39 PM, Dmitrii Dimandt <[hidden email]
> <mailto:[hidden email]>> wrote:
>
> This is an excellent guide. However, it mostly deals with language
> constructs and programming habits. It would be nice to complement this
> with a "writing style" guide that would discuss identation and nesting,
> naming conventions etc.
>
>  
>
>  
>
>
> Where to put punctuation, naming etc. is a matter that is discussed with
> religious fervor - nobody agrees
> here at all ...
>
> /Joe
>  
>
>
>
>     What about this?
>
>      
>
>     http://www.erlang.se/doc/programming_rules.shtml
>
>     On Wed, May 18, 2011 at 2:16 PM, Dmitrii
>     Dimandt <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Hi all!
>
>
>
>         Is there a more-or-less universally accepted Erlang Style Guide.
>         SImilar to, say, PEP08 (http://www.python.org/dev/peps/pep-0008/).
>
>         If there isn't, does anyone has a style guide the use? Would you
>         care to share you style guides with the list?
>
>         Thank you!
>         _______________________________________________
>         erlang-questions mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
>     --
>     Regards,
>     Alexander
>
>
>     _______________________________________________
>     erlang-questions mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>  
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions