Re: Smart match table

2006-02-09 Thread Mike Guy
Robin Houston [EMAIL PROTECTED] wrote
   Any Code()simple closure truth match if $b-() (ignoring $a)

I obviously missed that when it went past on p5p.   Surely that should
read

Any Code()predicate(value) match if $b-($a)

meaning that $a satisfies the predicate implemented by the code $b?

Ignoring $a seems a completely stupid thing to do.


Mike Guy


Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Mike Guy
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