[erlang-questions] erlang sucks
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
> (case x of x when true,false ->ok; _-> nok end.
> case x of x when true and false ->ok; _-> nok end.
> case x of x when true andalso false ->ok; _-> nok end.
> erlang-questions mailing list
If you don't know reason, don't say there is not reason:
6> F1 = fun() -> ok =/= io:format("F1~n") end.
7> F2 = fun() -> ok =/= io:format("F2~n") end.
8> F1() and F2().
9> F1() andalso F2().
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions