Autrijus Tang wrote:
So does it mean that a "3-story" multisub with two colons will
always win against one with one colon?

    multi sub foo (Any $x: Str $y: Str $z, Str $w) { 1 }
    multi sub foo (Str $x, Str $y: Str $z, Str $w) { 2 }

    say foo("x", "y", "z", "w"); # 1

Is the final level ($z and $w) participating in the MMD at all
as tiebreakers?  Luke mentioned that in all levels but the final
one, Manhattan distance (sum of inheritance deltas of each invs
to the expected types) is used, but on the final level, leftmost
tiebreaking is used.  Is that the case?  If yes, why? :)

I'm also very keen on hearing the rationale behind these decisions.

Do I get it right that Luke is advocating something else
in @Larry? If yes, what?

I think the only difference apart from scoping issues between
a multi method and a multi sub is that the former has the first
parameter to be most specific on the class it is defined in.
Question: is this parameter always implicitly added or is the
double-colon syntax needed to give an explicit invocant identifier?
And how does that work together with the ./method syntax?

My concern is that all these tie breakers, special casing syntax
etc. are weakening the type system. Or putting it differently:
How is 'type error' defined? Note that I'm *not* asking at what
time it is detected---but it should be before the call or immediatly
after when the return type doesn't match the callers wants.
$TSa == all( none( @Larry ), one( @p6l ))

Reply via email to