Luke Palmer writes:
> Scott Walters writes:
> > This would lend itself a P5 backport that did overload on its argument, too. If
> > it found that the thing on the right hand side was also overloaded into the
> > same class, it is could use a single iterator on both sides, otherwise it would
> > treat the 2nd argument as a scalar. This would solve the "single iterator
> > per line" problem for p5 atleast. It would work correctly. Any number of
> > vectorized arrays could be floating around in an expression, each interacting
> > with each other correctly.
> 
> Of course you mean "æinteracting withæ other correctly." :-)

Grr!  That ruined that joke!  I'd better get this unicode thing figured
out before Perl 6 is released.

    Âinteracting with other correctly.

Luke

> > Would it be possible to subclass things on the fly, returning a specialized
> > object representing the argument that knew how to vectorize when asked to add?
> > Aren't add, substract, multiply, and so on, implemented Ãs class methods in
> > Perl 6, much like Perl 5's overload module?
> 
> No!  And I couldn't be happier!  They're multimethods, dispatching based
> on I<both> their arguments, not just the left one.
> 
> Luke

Reply via email to