[erlang-questions] Dict size in guards

Robert Virding robert.virding@REDACTED
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.

Robert

----- "Alessandro Sivieri" <alessandro.sivieri@REDACTED> 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
> alessandro.sivieri@REDACTED
> http://www.chimera-bellerofonte.eu/
> http://www.poul.org/

-- 
Robert Virding, Erlang Solutions Ltd.



More information about the erlang-questions mailing list