Will Coleda wrote:
Yes, it would be specified as Int/Str/Num in the signature. But
then invoking the multi with an I register or integer constant
should recognize 'Int' as being a match, and not just 'Integer'.
My concern here is HLL interop. I think it would be cleaner to specify
the base types ( or perhaps a does ) to be generic enough to let another
language invoke your multis.
So, use a generic Integer/String/Float (or INT/STRING/FLOAT) when you
can accept any equivalent type, and only use Int/Str/Num when you
specifically need the Perl 6 types.
That I would leave as a choice for the compiler writer. They'll want to
hide the details of Parrot's internal multi signatures from the users,
but can emit any low-level signature they want for a high-level
signature (or even several different low-level signatures, if the
high-level multidispatch system has greater flexibility).
Allison