[erlang-questions] Dict size in guards

David Mercer <>
Fri Feb 11 15:35:01 CET 2011


On Thursday, February 10, 2011, Richard O'Keefe wrote:

> Guards cannot and should not call functions.
                ^^^^^^^^^^^^^^

Is the "should not" because of side-effects in Erlang functions?  If Erlang
functions were pure, would you remove the "and should not" from your
statement?  I realize there may be issues of performance if they are
allowed, but that would be up to the programmer, I suppose.  Does Haskell
permit user-defined (non-monadic) functions in guards?

Just asking from a language theory point of view, since I know you're an
expert in this area.  Thanks, ROK.

Cheers,

DBM



More information about the erlang-questions mailing list