On 11/03/2008, <b class="gmail_sendername">Mats Cronqvist</b> <<a href="mailto:mats.cronqvist@kreditor.se">mats.cronqvist@kreditor.se</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> <br>  i remain convinced that 'if' is worthless and does nothing but add to<br> the bloat.</blockquote><div><br>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.<br>
<br>But the resulting 'if' would definitely be more useful.<br><br>Robert<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
  mats<br> <br>_______________________________________________<br> erlang-questions mailing list<br> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br>