P6 duck typing and can syntax

VSarkiss on 2005-08-12T14:14:35

As I was following links from the latest Perl 6 summary, I found some notes from Autrijus that mention the "duck typing" principle, and a proposed syntax for the "can" declaration, like this:

    my subtype Duck
        has $.half_life
        can doom:()
        can quake:(() returns Wolfenstein);

Then I realized the connection is that :(() looks like a duck bill.


binding the universe together..

WebDragon on 2005-08-12T18:31:43

Somehow I just knew the whole Perl6 thing was being stuck together with chewing gum and Duck Type... *snicker*