If it is the case that :method and :multi are incompatible, I am a bit surprised to see that in the Rakudo src directory:
$ grep -rHI ':method :multi' . | grep -v '.svn' | wc -l 94 On Sun, Sep 21, 2008 at 11:30 AM, chromatic <[EMAIL PROTECTED]> wrote: > On Friday 19 September 2008 21:46:53 Chris Davaz wrote: > >> In any-str.pir we need to figure out how to change >> >> .sub 'split' :method :multi('String') >> >> into >> >> .sub 'split' :method :multi(_, 'String') >> >> since the former method signature is causing problems for me as I'm >> trying to implement >> >> .sub 'split' :method :multi(_, 'Sub') >> >> with an additional optional argument (the limit of how many elements >> to return in the list). > > :method and :multi are fundamentally incompatible; the former implies single > dispatch while the latter explicitly expresses multiple dispatch. The PIR > compiler *could* unshift a type constraint onto the list of invocants > when :multi and :method appear together, but I'm not sure that produces clear > code. > > -- c >