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 lurking in the Monastery: (7)
As of 2014-09-17 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls