At 10:34 AM 4/7/02 +1000, Damian Conway wrote: > > It's very cool--but why is it $key =~ %hash but $value =~ @array rather > > than one way or the other? > >Because it's *both* ways. Perl 6's C<=~> operator is reversible. > >So you can write: > > $key =~ %hash > >or: > > %hash =~ $key > >and: > > $value =~ @array > >or: > > @array =~ $value > >depending on how the muse takes you.
Why give up the chance to let things that look different behave differently? What do @left =~ @right %left =~ %right do? One can imagine useful default interpretations that are not commutative. -- Peter Scott Pacific Systems Design Technologies