[erlang-questions] Style wars: junk comments

Vlad Dumitrescu vladdu55@REDACTED
Mon Sep 17 15:53:59 CEST 2012


Hi,

On Mon, Sep 17, 2012 at 3:43 PM, Steve Davis
<steven.charles.davis@REDACTED> wrote:
> 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, ....}
> ]).

When this kind of description grows in detail, why not use the edocs
and the -specs? The edocs could be parsed and stored in an attribute
available at runtime, and the -spec is more complete that the simple
types above. A lot of Erlang code already has edoc comments and
-specs. Why invent a new format that says the same thing?

Just playing ;-)

regards,
Vlad



More information about the erlang-questions mailing list