Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Solving compositional problems with Perl 6 roles

by kappa (Chaplain)
on Aug 23, 2004 at 12:17 UTC ( #385068=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

Would be nice to NOT know whether $stranger is an "elf type-of thief" or "thief type-of elf" and be able to do this:

# ".?" means "call if the obj CAN the method" acc. to Apoc12 $stranger.?steal; $stranger.?shoot_arrows;
and expect DWIMming (doing both things in both cases). That's the whole point of polymorphism, is it not? :)

Update: upgrade perl5 syntax to perl6 (Apoc12).


Comment on Re^4: Solving compositional problems with Perl 6 roles
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2015-07-29 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls