Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^4: Solving compositional problems with Perl 6 roles

by Ovid (Cardinal)
on Aug 23, 2004 at 14:39 UTC ( #385084=note: print w/replies, xml ) Need Help??

in reply to Re^3: Solving compositional problems with Perl 6 roles
in thread Solving compositional problems with Perl 6 roles

Well, I think I goofed on this one. From reading A12, it appears that anonymous classes are built and bound to objects that use mixins. I missed that point and now it seems like we're going to have inheritance problems again. When I posted a question about this to the Perl 6 language list, Larry Wall responded:

That's just a problem with run-time mixins in general if you can't know in advance that you're going to want both roles. That's why we encourage as much of that to be done at compile time as possible.

This does seem like it will cause more design issues, but Larry and TheDamian both had ways around this. They suggested strategies such as creating anonymous classes or anonymous roles that could disambiguate methods as needed. I guess that makes sense as magician thieves would want the magic users spell-casting ability but the thief's fighting ability and those seem like rules that might have to be decided at compile time.

You can read the Perl 6 language discussion here.


New address of my CGI Course.

  • Comment on Re^4: Solving compositional problems with Perl 6 roles

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://385084]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2020-02-26 01:47 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (113 votes). Check out past polls.