[erlang-questions] Style wars: junk comments

Steve Davis steven.charles.davis@REDACTED
Mon Sep 17 15:43:19 CEST 2012


Good naming is often the hardest game. 

I have also used "public" rather than "api"... but that too has overtones; but maybe it's better 

- and you could go further I guess:

-public([
	{foo, [term, list], number, "Finds number of terms in list"},
	{bar, ....}
]).

Just playing :)

/s

On Sep 16, 2012, at 5:26 PM, "Richard O'Keefe" <ok@REDACTED> wrote:

> 
> On 17/09/2012, at 7:12 AM, Steve Davis wrote:
> 
>> Since you can invent attributes, I have played with:
>> 
>> -api({{Name, Arity}, "Short Descriptive Usage Comment"}).
>> 
>> ...as a means of compiling brief module self-documention that is visible in X:module_info(attributes).
> 
> That's a nice one.  Except that I hate 'api'.  It is still defined as
> "Application Programming Interface" and is the interface presented by
> a library layer such as an operating system or the X11 window system
> to application programs.  Some people started using it to mean
> "function" apparently because "function" had too few syllables.
> How about "purpose" (two syllables instead of three) or even "for" (one)?
> 
> EEP 24 suggested allowing Name/Arity anywhere in any attribute.
> 
> -for({foo/1, "listing clowns"}).
> -for({bar/2, "telling a clown what routine to use"}).
> -for({ugh/3, "advising a clown which way to run and how fast"}).
> 
> That EEP has R12B-5 written beside it, so it _should_ work... 
> 




More information about the erlang-questions mailing list