[erlang-questions] Best practice for defining functions with edoc,erlc,eunit and the dialyzer

Richard O'Keefe ok@REDACTED
Wed Dec 2 23:29:43 CET 2009


On Dec 2, 2009, at 10:28 PM, Joe Armstrong wrote:

> Best practice for writing documenting and testing code
>       -module(elib1_best). %% [1]
>
>       %% elib1_best: Best practice template for library modules [2]
>       %% Time-stamp: <2009-12-02 09:43:12 ejoearm> [3]

If you are using edoc, shouldn't that be

	%% @author Joe Armstrong <ejoearm>
	%% @version 2009-12-02 09:43:12

Perhaps there should be a @date tag; dates and version numbers
really aren't the same thing.
>

>       % 
> %----------------------------------------------------------------------
>       %% Copyright (c) 2009 Joe Armstrong <erlang@REDACTED> [4]
>       %% Copyright (c) 2009 Whoomph Software AB

Again, if you are using edoc, shouldn't those be

	%% @copyright © 2009 Joe Armstrong <erlang@REDACTED>
	%% @copyright © 2009 Whoomph Software AB

The old idea of using -<tag>(<value>). declarations seemed to me to
be a better way of doing this:  the information was available to any
documentation tool that wanted it *AND* it could be copied into the
.beam file by the compiler.




More information about the erlang-questions mailing list