develooper Front page | perl.perl6.language | Postings from May 2005

Method overloading, MMD/SMD

Yuval Kogman
May 27, 2005 03:15
Method overloading, MMD/SMD
Message ID:
In Synopsis 13 MMD is discussed as the mechanism for overloading an

Many a times I would like to overload a method of a class.

I just played around with this:

Notice how the Named event variation appends the role, adding some
more specific signatures to familiar functions, to increase

How do i get this to behave?

Do I need to say all the methods that can ever be overloaded are
multi? Or do I say that only the overloading ones are multi? If the
first - how do I get a delegation to be multi? Does that rely on the
delegation handler method?

Also, is SMD not possibly representable in MMD? Is SMD a subset of
MMD or a completely different system?

Also on a side note, say I have two roles, both of which define the
private attribute $.:horse. Do these attributes conflict, or does
each role get it's own slot? What about MI/mixins?


 ()  Yuval Kogman <> 0xEBD27418  perl hacker &
 /\  kung foo master: /me tips over a cow: neeyah!!!!!!!!!!!!!!!!!!!!!! Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About