[erlang-questions] erlang sucks

Hynek Vychodil vychodil.hynek@REDACTED
Wed Mar 12 14:37:46 CET 2008


2008/3/12 Mats Cronqvist <mats.cronqvist@REDACTED>:

> Ulf Wiger (TN/EAB) wrote:
> > Robert Virding skrev:
> >
> >> ...
> >> But the resulting 'if' would definitely be more useful.
> >>
> > ...
> >
> > The 'if' statement is not high on my list of things that need
> > improving. It's actually quite ok, except it could perhaps have
> > been named differently, in order not to give people false
> > expectations.
>
>
>   just to be clear; i don't think 'if ' should be improved.
>  and i realize it cannot be removed either :<
>
>  what i proposed was that it'd be obsoleted. in practice that would
> mean that there'd
> be a prominent document named "Obsolete features" or somesuch. That
> document would list
> old cruft; such as
> * '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
> http://www.erlang.org/mailman/listinfo/erlang-questions
>

If you don't know reason, don't say there is not reason:

6> F1 = fun() -> ok =/= io:format("F1~n") end.
#Fun<erl_eval.20.62269157>
7> F2 = fun() -> ok =/= io:format("F2~n") end.
#Fun<erl_eval.20.62269157>
8> F1() and F2().
F1
F2
false
9> F1() andalso F2().
F1
false


-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080312/9eca5e51/attachment.htm>


More information about the erlang-questions mailing list