[erlang-questions] difference between ", " and "andalso" in guards
Tue May 20 07:34:36 CEST 2014
> Using orelse behaves differently, it doesn't treat the arguments quite so
> 1> (fun () when hd() orelse true -> ok end)().
> ** exception error: no function clause matching
> 2> (fun () when hd(); true -> ok end)().
Is this deliberate? It looks very like a bug.
It is hard to imagine this distinction being *useful*.
The right thing to do would have been to allow , and ; to
be nested in guards. *Sigh*.
More information about the erlang-questions