[erlang-questions] Dict size in guards

Robert Virding <>
Thu Feb 10 18:27:14 CET 2011

There is a general restriction on guard tests that no calls to user defined functions are allowed. This irrespective of how simple these functions may be, as there is no way of guaranteeing this at run-time.


----- "Alessandro Sivieri" <> wrote:

> Hi all,
> is there a good reason for not allowing dict:size() in guards? I mean,
> it
> looks exactly like length() for lists, in theory (of course, their
> implementations are different).
> -- 
> Sivieri Alessandro
> http://www.chimera-bellerofonte.eu/
> http://www.poul.org/

Robert Virding, Erlang Solutions Ltd.

More information about the erlang-questions mailing list