Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Solving compositional problems with Perl 6 roles

by dragonchild (Archbishop)
on Aug 22, 2004 at 03:09 UTC ( #384870=note: print w/ replies, xml ) Need Help??


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

That would imply that the possession of one trait implies the removal of another. Now, you're starting to talk Prolog-style levels of compiler knowledge. While this wouldn't necessarily be a bad thing, and would be implemented in the definition of the trait, I can see how this would be quite reasonably construed as some serious action-at-a-distance ...

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested


Comment on Re^2: Solving compositional problems with Perl 6 roles
Re^3: Solving compositional problems with Perl 6 roles
by BrowserUk (Pope) on Aug 22, 2004 at 03:45 UTC

    I'm not sure what you mean by "That..."?

    ... does Program, Manage, FirstAid;

    was meant to imply the equivalent of

    ... does Program does Manage does FirstAid;

    with $individual stops FirstAid; removing the latter Role when appropriate.

    Unless your referring to the last bit about the compiler mapping $individual does Thieving; to $individual isn't Employee;, in which case, my attempt at humour failed completely.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
      Actually, I think that your attempt at humor was actually a good idea, in disguise. I can see where one would like roles to be exclusionary - if $foo does X, that means you cannot have $foo does Y, so there should be a way of specifying that in the definitions of X and Y. But, as I said earlier, this is starting to sound like Prolog. (Not necessarily a bad thing, mind you ...)

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      I shouldn't have to say this, but any code, unless otherwise stated, is untested

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2014-11-27 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls