[erlang-questions] erlang sucks

Thomas Lindgren thomasl_erlang@REDACTED
Wed Mar 12 13:19:10 CET 2008


--- Robert Virding <rvirding@REDACTED> wrote:

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

We even have a keyword waiting for this: cond. On
consideration, I think I'd prefer instead generalizing
guards into deep guards (ie, at the very least,
user-defined calls available) everywhere.

An arbitrary call exiting in a guard would have to
convert to failure, just as guards work today. I'd
also suggest turning off side-effects while inside a
guard (even deep down in function calls), converting
attempted side-effects into exits.

(I guess the modest proposal above ought to be an EEP
too.)

Best,
Thomas




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the erlang-questions mailing list