Chromatic <[EMAIL PROTECTED]> wrote: > Hi all, > I'd like to register some subroutines defined in PASM (or better, PIR) > as participating in multiple dispatch. This is very handy when writing > Test::Builder::is(), for example, which can compare two strings, > integers, numbers, or PMCs, or for calling NCI functions which can take > various types and numbers of arguments that all do very similar things.
> Dan suggested a new op with a scheme similar to: > register_mmd S1, S2, P - MMD is misleading. MMD is our function dispatching scheme for binary-like vtables. I'd call it register_multi Smulti, Sreal, Sproto register_multi Pmulti, Preal, Sproto C<Sproto> is a "runops" prototype specifier like "III" for add_integers. An array is a bit to heavy for that IMHO. > There are other options for declaring the signature. There could be: > register_mmd S1, S2, I1, I2, I3, P > where I1 is the number of arguments in the I register, Register counts don't say anything about argument order. I don't think that'll work. leo