On 7/8/05, Yuval Kogman <[EMAIL PROTECTED]> wrote:
> I have a draft of a proposition for what I think is proper MMD
> dispatching order:
> Order of definition tie breaking:
> Two signatures defined in the same file:
> the one EARLIER in the file wins
> Two signatures defined in a different file:
> the one defined LATER in the file wins
Hmm. I wonder if we should just make the later ones win in all cases.
Generally when I structure code, I find it most natural to go from
general to specific. If we're going to make a choice for the user
(something we usually avoid), we might as well go with the one that I
would pick :-)
I like the idea of your tree of match order, I just don't like the
tree itself too much. If we're going to reorder things for the user,
it does need to happen in a predictable way, even if it's not correct
100% of the time. I find your tree to be pretty complex (that could
be because I don't understand the reasoning for the ordering
decisions). I'd prefer something more like:
2. Junctions / Ranges
Where none of them is recursively decended into for matching. That
particular order has no special significance, it just felt natural.
I'm just pointing out that it should be simple.
Still, I very much agree with your desire to be able to extend someone
else's interface, which we can solve by messing with the tiebreaking
 That is also my complaint about the Manhattan metric for
multimethod resolution: it is only simple and predictable when you
have the whole class heirarchy in your head.