[eeps] : Proposal for /\ and \/ operators

Pierpaolo Bernardi olopierpa@REDACTED
Thu Feb 26 17:14:41 CET 2009


On Thu, Feb 26, 2009 at 4:57 PM, Hakan Mattsson <hakan@REDACTED>wrote:

> On Thu, 26 Feb 2009, Pierpaolo Bernardi wrote:
>
> > > Yes I am quite familiar with /\ being AND and \/ being OR.
> > > That is in the basic math courses at University.
> >
> >
> > I meant, it's common to use these symbols for min and max,
> > like they are used in boolean algebra.
> >
> > In an algebra on the values true and false, where true and false are
> > ordered,
> > with false < true, the operation OR is the same as MAX and AND is the
> same
> > as MIN.
> >
> > (Think false = 0, true = 1, and all will snap in place :)
>
>
> I do not think that this is intuitive for the average Erlang programmer.
>
> Do we really need to clutter the language with more operators in order to
> introduce efficient support for min and max?


No, I think we don't.  I don't understand what's the problem that this eeps
wants to solve.  I don't see the gain, I see the increase in funny syntax
to recognize, and I see another couple of operators whose precedence
I must remember.


> Why does it not suffice to make the implementation of lists:min/1 and
> lists:max/1 more efficient as Richard C suggested?


Yes, if there are resources to spend on this issue.

Cheers
P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/eeps/attachments/20090226/7ccb096c/attachment.htm>


More information about the eeps mailing list