[erlang-questions] When to return {ok, Value} or just the Value

Rapsey <>
Mon Nov 14 11:17:53 CET 2011


I would say don't use it for functions with no side effects and use it when
you are interfacing something on the outside (files or sockets).


Sergej

On Sun, Nov 13, 2011 at 7:35 AM, Steve Davis <
> wrote:

> Is there a rule-of-thumb guidance as to when it is the right "time" to
> return {ok, Value} and when to return just the raw value.
>
> Both are valid approaches according to the coding guidelines. The
> libraries do both.
>
> All and any comments/observations appreciated.
>
> best,
> /s
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111114/1615aeaa/attachment.html>


More information about the erlang-questions mailing list