The Perl6 compiler often appends on array onto another. Right now, it does this by iterating over the source array. I would like to just use the C<splice> op, but I am now getting a mixture of PerlArrays (from Perl6) and Arrays (from C<foldup>), and the C<splice> vtable entry only works if the types of the arrays is identical.
This sounded to me like a perfect application of MMD: I could define splice(PerlArray,PerlArray), splice(PerlArray,Array), and splice(other, other). But my initial foray into the MMD code raised enough questions that I was hoping I could borrow a few clues from someone who's been paying more attention to things. Is this a reasonable thing to do with the current MMD setup? Where should I register my routines? The MMD stuff I looked at seemed intended only for binary C<lhs = left op right> operators; splice needs to dispatch on only its two PMC entries, but has a function signature that takes a few other parameters (integer offset and count).