Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Solving compositional problems with Perl 6 roles

by kappa (Chaplain)
on Aug 23, 2004 at 12:17 UTC ( [id://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).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found