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

Max Bourinov bourinov@REDACTED
Mon Nov 14 19:09:07 CET 2011

Agree with Max Lapshin. I also use the same approach.

On Mon, Nov 14, 2011 at 4:23 PM, Max Lapshin <max.lapshin@REDACTED> wrote:

> I think, it is a very good rule to choose whether function can be
> tuple-return or throw-return:
> if it has to work with outside world, than let is return {ok, Value} |
> {error, Reason}
> if it is "clean", than return Value or throw error is ok.
> _______________________________________________
> 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/02abfb77/attachment.htm>

More information about the erlang-questions mailing list