[erlang-questions] erlang sucks
Wed Mar 12 16:28:23 CET 2008
On Wed, Mar 12, 2008 at 3:02 PM, Mats Cronqvist <mats.cronqvist@REDACTED>
> Hynek Vychodil wrote:
> > 2008/3/12 Mats Cronqvist <mats.cronqvist@REDACTED
> > <mailto:mats.cronqvist@REDACTED>>:
> > * 'if'
> > * the three different 'and' (*)
> > * split_binary()
> > * the old type guards (integer() vs. is_integer())
> > * tuple funs
> > etc...
> > mats
> > (*)
> > (case x of x when true,false ->ok; _-> nok end.
> > nok
> > case x of x when true and false ->ok; _-> nok end.
> > nok
> > case x of x when true andalso false ->ok; _-> nok end.
> > nok
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> > If you don't know reason, don't say there is not reason:
> i am aware that the different kinds of 'and' are subtly incompatible.
> that's the reason i think it's a problem...
> or are you saying there is a need for several 'and'? in that case i
Well, than say it to Joe :-)
'and' is and in mathematical manner
'andalso' is lazy and in programmers manner
I think there is no way to change it, because if you remove 'andalso' and
use 'and' in programmers manner lazy behaviour, you will break some legacy
code a vice versa. This change is impossible. You can be not agree with it.
You can argue against it, but it is all what you can do with it.
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions