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

Reply via email to