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

Zoltan Lajos Kis kiszl@REDACTED
Fri Dec 4 23:29:15 CET 2009


Richard O'Keefe wrote:
>
> On Dec 3, 2009, at 10:55 PM, Zoltan Lajos Kis wrote:
>> I prefer to group the "API" functions based on their functionality
>
> If their functionality isn't too close to make this easy,
> why are they in the same module?
Most servers provide a server-functionality (start, start_link, stop, 
...) towards the application,
and a separate functionality towards its users. But you are right, even 
these can be put into two
separate modules. I will consider this.
> ... cut intentionally ...
> This one currently has to survive because there is no
> erlang:hibernate/1, though it's not clear why.  If there were,
> it could be
>
> hibernate(Fun) ->
>     erlang:hibernate(fun () -> wake_up(Fun) end).
>
>
> Just because there _are_ lots of "Internal exports" doesn't
> mean that there NOW _should be_.
>
> I've written up an EEP for this, but on reflection, I believe that
> library changes are supposed to be posted to this list, so my next
> message will be exactly that.
>
I got your point. A minor inconvenience with this approach is that it
generates a bunch of "function xyz/# is unused" warnings.


More information about the erlang-questions mailing list