[erlang-questions] Any wisdom to offer on "tagged return values"

mats cronqvist masse@REDACTED
Thu May 7 15:05:16 CEST 2009


Per Melin <per.melin@REDACTED> writes:

> Ulf Wiger:
>> Not exactly revolutionary, nor especially elegant, but
>> it's extremely convenient to be able to chain functions
>> together without having to insert unwrapping code.
>
> I personally like the combination of the tagged return value and the
> description of this function in the inet module:
>
> gethostname() -> {ok, Hostname}
> Returns the local hostname. Will never fail.

  Well, if people actually read and followed the "Programming Rules",
  this is what all code would look like.

  mats



More information about the erlang-questions mailing list