[erlang-questions] Package Support/Use
Bjorn Gustavsson
bjorn@REDACTED
Tue Nov 7 15:39:51 CET 2006
Thomas Lindgren <thomasl_erlang@REDACTED> writes:
> --- Samuel Rivas <samuelrivas@REDACTED> wrote:
>
> > When you call a function that uses exceptions you
> > can either catch the
> > exception if you want or ignore it if it is
> > meaningless in the context.
> > Higher level functions can catch the exception
> > later.
> >
> > With tagged values you _must_ handle the tagged
> > value, even if you
> > want to ignore error cases.
>
> Note that, going in the other direction, you can also
> straightforwardly generate an exception from a
> returned tagged value (e.g., badmatch), which then can
> be handled by higher-level functions, etc. So, at
> least for Erlang, I'm not sure your argument is
> conclusive.
Also note that generating an exception from a tagged value
is probably slightly more efficient.
/Bjorn
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list