Summary: the original trait researches did intend for class methods to have 
precedence over roles methods in composition, but they had no intention that it 
do so silently.  In fact, they go on to say that doing so silently would be a 
bad idea.  One way of resolving this is to do what Sun finally realized that 
Java needed to do: they provide an @Override annotation for methods which 
override parent methods.  The compiler should warn if an overridden method is 
not annotated as such 

See for more information, including 
relevant correspondence with the researches (used with permission).

Would Perl 6 consider a feature to add a warning if a class method silently 
takes precedence over a role method?

Buy the book         -
Tech blog            -
Twitter              -
Official Perl 6 Wiki -

Reply via email to