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

Rapsey rapsey@REDACTED
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 <steven.charles.davis@REDACTED
> 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
> erlang-questions@REDACTED
> 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.htm>


More information about the erlang-questions mailing list