Re: More Method Resolution Order Questions (and WALKMETH and WALKCLASS)

2005-07-18 Thread Stevan Little

Ok, I will un-warnock myself here :)

As of r5674 in the Pugs tree, the Perl6::MetaModel now supports all the 
A12 dispatch orders.



:canonical  # canonical dispatch order
:ascendant  # most-derived first, like destruction order
:descendant # least-derived first, like construction order
:preorder   # like Perl 5 dispatch
:breadth# like multimethod dispatch


For :descendant I just did a reverse of the :ascendant order. I am not 
sure that is truly sane or not, but it seemed to make sense to me.


And after some discussion on #perl6 I decided to make 'C3' the 
algorithm of choice for the :ascendant ordering, and also to make 
:ascendant the :canonical ordering (since it makes MI sane, I mean how 
could you go wrong).


Of course all this can change if @Larry decides differently :)

Anyway, back to $work :)

Stevan




Re: More Method Resolution Order Questions (and WALKMETH and WALKCLASS)

2005-07-18 Thread Larry Wall
On Mon, Jul 18, 2005 at 02:54:40PM -0400, Stevan Little wrote:
: Ok, I will un-warnock myself here :)

Sorry, I've been occupied by various time-consuming family obligations.

: And after some discussion on #perl6 I decided to make 'C3' the 
: algorithm of choice for the :ascendant ordering, and also to make 
: :ascendant the :canonical ordering (since it makes MI sane, I mean how 
: could you go wrong).
: 
: Of course all this can change if @Larry decides differently :)

It has been a long-standing desire of $Larry to head that direction,
so unless any(@Larry) complain, that seems fine.  I guess I only
wonder whether that will make it harder to view SMD as a constrained
subset of MMD since it might be construed as forcing a different
distance metric.  But maybe preserving SMD ordering as a subset of
MMD shouldn't be a major concern, since it's one of those things that
makes more difference in the weird cases than in the usual ones,
and since Perl 6 is providing explicit call differentiation of SMD
vs MMD for anything above one argument.

Larry