Leopold Toetsch [EMAIL PROTECTED] wrote
dropping bitwise xor, and including undef xor undef reveals that Perl5
has a different opinion then Parrot (or Perl6?).
inline op xor(out INT, in INT, in INT) :base_core {
$1 = ($2 ! $3) ? $2 : ($3 ! $2) ? $3 : 0;
goto NEXT();
}
We need language lawyers ;)
IANAL, but I am a mathematician.Because Cxor necessarily always
depends on *both* its arguments, analogies with Cand and Cor are
inappropriate.Cxor cannot short-circuit, and it is not sensible
to return as result either of the arguments. So the above macro
is misguided nonsense.
Perl5 Cxor always returns a standard boolean value, i.e.
dualvar(0, '') or dualvar(1, '1').Perl6/Parrot should do the same
thing.
Mike Guy