On Sun, Feb 20, 2005 at 11:52:09AM +1100, Damian Conway wrote: > But I've repeated stated my strong belief that junctions are scalar values, > *not* lvalues. So the result of that assignment ought to be: > > Can't modify constant item in scalar assignment at demo.pl line 1
Yay for sanity. :) It's how pugs implement it, too. > Brent's analysis is spot on, assuming that C<cmp> on junctions works as he > envisaged. Personally, I think I'd implement C<cmp> as: > > multi sub infix:<cmp> (Any|Junction $lhs, Any|Junction $rhs) { > return -1 if $lhs lt $rhs; > return 1 if $lhs gt $rhs; > return 0 > } Hrm, so Junction.isa("Any") == False? I need to retype print(), say() and other primitives, then. Thanks, /Autrijus/
pgpFXp9YvzxMF.pgp
Description: PGP signature