[eeps] Proposal for /\ and \/ operators

Richard Carlsson <>
Thu Feb 26 10:47:39 CET 2009

Ulf Wiger wrote:
> I agree. The suggested operators seem intuitive enough.
> I support the EEP.

This is tricky. To some of us (if you own a book on lattice
theory, you definitely belong to this group), /\ and \/ do seem
quite natural and intuitive and have all the advantages over
min(A,B) and max(A,B) that Richard O'Keefe explains. And min/max
operators are very useful. But it is also apparent that this
notation is not at all obvious to many people, so it would take
some time for them to get used to it.

If I consider how often I've written my own local definitions of
min and/or max, it might turn out to be on the order of one in
three modules. Now, I would have been happier if these functions
had been built-ins to begin with, but I can live with the current
situation. It's a bit of a bother, but does it warrant adding
more operators, if those operators will only occur occasionally
and will have a good chance of confusing people? Erlang is not
an operator-heavy language; if it were, I might be less hesitant.

Another possibility would be to make the compiler handle the
existing lists:min/1 and lists:max/1 functions more efficiently
when the argument is a literal list, as in lists:min([A, B]).

    /Richard C

More information about the eeps mailing list