Guard sequences, short circuit boolean operators
Bjorn Gustavsson
bjorn@REDACTED
Tue Feb 8 10:41:37 CET 2005
We hope to allow andalso/orelse in guards in R11B.
/Björn
Matthias Kretschmer <mccratch@REDACTED> writes:
> Hello
>
> I just wonder why andalso and orelse aren't allowed in guard
> sequences. Even in the case of backward compatibility it makes no
> sense, they are just equal to the normal "and" and "or" (ignoring
> precedence rules ...) as far as I understand the reference manual
> correctly. I just want to know the reason for this ... - in my humble
> opinion it looks a bit weird using andalso in one place and being
> forced to use and in another place to have the same thing (or using a
> "," which I assume is something left from the days when Erlang was
> running in a Prolog system?).
>
> --
> Cheers
> Matthias Kretschmer
>
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list