hg: lambda/lambda/jdk: Update initial lambda APIs and tests to use new syntax
Bob Foster
bobfoster at gmail.com
Mon Sep 12 11:22:39 PDT 2011
On Sun, 11 Sep 2011 22:12:58 -0700 Stuart Marks wrote:
> The binary xor seems useful, but I find the N-ary xor questionable.
Indeed,
> this was discussed when the functions were initially pushed; see the
thread
>
> http://mail.openjdk.java.net/pipermail/lambda-dev/2011-August/003772.html
>
> in particular the comments from Steven Simpson and David Holmes. The
method's
> doc seems to describe xnor. In addition I don't think there was agreement
on
> the definition of N-ary xor. Even if we did agree, I'm not sure it would
> actually be useful. :-) So, I'd vote to remove the N-ary xor() variants.
I recall that peculiar thread. :) As Steven Simpson said then:
> I would expect N-ary XOR to yield true if the number of true
> operands is odd, with no possibility of short-circuiting the result
This is not just Steven's opinion, it's the definition of xor. Adding more
operands - A ^ B ^ C ^ ... - doesn't change the definition. Should fix the
n-ary case as above, change its name or remove it.
Bob
More information about the lambda-dev
mailing list