[erlang-questions] comma vs andalso
Mon Jul 20 17:51:38 CEST 2009
----- Original Message ----
> From: Robert Virding <rvirding@REDACTED>
> To: Thomas Lindgren <thomasl_erlang@REDACTED>
> This functionality was added for just this case. There is logic in the
> madness. It was simple before with only simple guard tests, it only became
> confusing when logical expressions were allowed in guards. They are
> practical but were only added later, THEY are the odd man out. This is also
> why originally there were no problems with type tests without is_ in guards.
> Guards were always meant to be part of pattern matching and no more.
(This fits my view of the history of guards, fwiw.) I've left a longer version of the argument in a reply to Richard, but basically, I think you would have saved some effort and gained some clarity and expressiveness by first of all implementing nested ","/";" as the connectives.
More information about the erlang-questions