[erlang-questions] erlang sucks
Wed Mar 12 01:43:38 CET 2008
On 11/03/2008, Mats Cronqvist <mats.cronqvist@REDACTED> wrote:
> i remain convinced that 'if' is worthless and does nothing but add to
> the bloat.
It would actually be possible to extend 'if' to allow non-guard tests and
user defined boolean functions in the test. Like in lisp. It would be almost
backwards compatible in that existing code would behave the same, BUT there
would be one fundamental difference for other tests. As the tests in 'if'
are guard tests then type errors just equate to failure of the guard while
an error in a non-guard test function (user or otherwise) would result in an
error being generated for the whole 'if' and function. Catching errors in
the test would probably be expensive (Björn?) and in some way break Erlang
semantics in adding implicit 'try's.
But the resulting 'if' would definitely be more useful.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions