[erlang-questions] Trouble with Erlang's lenient comparisons

Richard O'Keefe ok@REDACTED
Thu Apr 14 03:35:25 CEST 2011

On 14/04/2011, at 3:52 AM, Robert Virding wrote:

> The comparison operators as they are now were a mistake, almost a bad mistake. IMAO what we should have done was to have had two different sets of operators, one set of numeric comparisons (without type conversion) and one set of gerneral term comparisons (without type conversion). So for example:
> == /= =< < >= >   would only work on numbers
> @== @/= @=< @< @>= @>   would work on all terms

Just like Erlang's predecessor Prolog!
Since the term/number distinction _was_ borrowed for equality and
inequality (although with the symbols switched around, which still
confuses me), I've often wondered why it wasn't borrowed for ordering.

More information about the erlang-questions mailing list