Why no is_octet(N) guard?

Richard A. O'Keefe ok@REDACTED
Fri Mar 11 00:42:32 CET 2005


I note that my 'abstract patterns' proposal could handle pretty much
any non-recursive side-effect free test you might want in a guard.
Abstract patterns are guaranteed, *without* any cross-module analysis,
to (1) have no side effects, and
   (2) terminate in finite time.

Writing an abstract pattern for 'is_octet' is a no-brainer;
writing an abstract pattern for 'is_string' is impossible, as it should be.

Arguably, guards should look _less_ like function calls than they do,
and instead of enlarging the set of names that could be used as guards
and in function bodies may have been a mistake.




More information about the erlang-questions mailing list