Enhanced type guard syntax]

Joachim Durchholz joachim.durchholz@REDACTED
Thu Sep 18 22:02:26 CEST 2003


Thomas Arts wrote:
> [...] there was a philosophy that all guards should be executable in
> constant time.

This philosophy doesn't work out IMHO.
Either, the guard is used as a selector. Then, if the guard is
disallowed, people are going to write the exactly same non-constant-time
code into the condition of an "if" statement, and nothing is won.
Or the guard is used as a precondition. In that case, it shouldn't be a
guard (but an assert statement or something - particularly, something
that can be switched off for production code).

Just my 2c.

Regards,
Jo




More information about the erlang-questions mailing list