On Sat, Apr 12, 2008 at 08:00:19PM -0500, John M. Dlugosz wrote: > Larry Wall larry-at-wall.org |Perl 6| wrote: >> What gives (in the sense of breaking) is the notion that you can do >> multiple dispatch on randomly ordered arguments. That's the main >> reason we invented proto multis, so that the compiler can rearrange >> supposedly randomly ordered arguments into positional slots so that >> you can to multiple dispatch on them. Other than that, we make no >> promises about supporting multiple dispatch on named args other than by >> excluding candidates that can't bind at all. >> >> Larry >> >> > > OK, I got it. > > Now what about "excluding"? Will it execute the code in the constraint > check for a subtype to see if it _might_ bind?
It will if the candidate gets to the top of the candidate list. I don't think the initial topological ordering of the candidate list should take any subtyping information into account beyond the fact that there is a subtype in one signature and there isn't in another. We have to not make things impossible to optimize except when we really mean it. :) Larry