----- Original Message ----
> From: Timothy S. Nelson <wayl...@wayland.id.au>
> class PracticalJoke {
>     has Bomb $bomb handles ;
>     has Spouse $spouse handles ;
> }
>     Note that I have no idea where (if anywhere) the type goes in this. 
> Hopefully someone will correct me here.  Note that this does not use the 
> roles 
> as roles; it uses them punned as classes.  But it does what you asked :).

Though I have issues with Jonathan's approach (I don't like classes silently 
discarding role methods as this has caused us many bugs at the BBC), it's much 
cleaner that what I see here.  You see, with Jonathan's, you only have to 
provide methods for what you're disambiguating, It seems like your code would 
require that I specifically list every method which is handled, which would 
clearly get unwieldy with large roles or many roles.  Did I miss something?
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to