Polymorphic copy: Difference between revisions
Content added Content deleted
(Converted both D entries from D1+Tango => D2+Phobos (I can't test Tango code)) |
(→{{header|Perl 6}}: add entry) |
||
Line 1,057: | Line 1,057: | ||
print "\$x is: "; |
print "\$x is: "; |
||
$x->manifest;</lang> |
$x->manifest;</lang> |
||
=={{header|Perl 6}}== |
|||
<lang perl6>my Cool $x = 22/7 but role Fink { method brag { say "I'm a cool {self.WHAT.perl}!" }} |
|||
my Cool $y = $x.clone; |
|||
$y.brag;</lang> |
|||
{{out}} |
|||
<pre>I'm a cool Rat+Fink!</pre> |
|||
=={{header|PHP}}== |
=={{header|PHP}}== |