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

mats cronqvist <>
Thu May 7 15:05:16 CEST 2009

Per Melin <> 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.


More information about the erlang-questions mailing list