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:
and expect DWIMming (doing both things in both cases). That's the whole point of polymorphism, is it not? :)# ".?" means "call if the obj CAN the method" acc. to Apoc12 $stranger.?steal; $stranger.?shoot_arrows;
Update: upgrade perl5 syntax to perl6 (Apoc12).
|
---|
In Section
Meditations