On Sat, Oct 04, 2008 at 10:08:10PM -0400, Bob Rogers wrote:
> Hmm.  My instinct would be to rely on MMD:
> 
>       .sub 'infix:*' :multi(Perl6Array,_)
>           .param pmc a
>           .param pmc b
>           $P0 = new 'Integer'
>           $P0 = a
>           .return 'infix:*'($P0, b)
>       .end
> 
>       .sub 'infix:*' :multi(_,Perl6Array)
>           .param pmc a
>           .param pmc b
>           $P0 = new 'Integer'
>           $P0 = b
>           .return 'infix:*'(a, $P0)
>       .end
> 
> This exposes an MMD bug (it runs forever), but something like this
> should work once it's fixed.

Unfortunately this approach means we'd have to write a separate
:multi for nearly every type and operator combination, including 
potentially the user-defined ones.

Pm

Reply via email to