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

Max Lapshin max.lapshin@REDACTED
Mon Nov 14 13:23:19 CET 2011

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.

More information about the erlang-questions mailing list