w00t! Rakudo Perl has classes!

Check it out! Rakudo Perl has classes with methods and attributes!

uniqua:~/parrot $ cat woot.pl
class Foo {
    has $a;
    method set {
        $a = "w00t";
    }
    method get {
        say $a;
    }
}

my $x = Foo.new();
$x.set();
$x.get(); # prints w00t

uniqua:~/parrot $ ./perl6 woot.pl
w00t

They're not complete by any means, but it's a big step forward. Thanks, Jonathan! Details in his journal.

Categories:

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on January 23, 2008 3:12 PM.

Detecting memory leaks in Rakudo Perl and Parrot was the previous entry in this blog.

Perl 6 Design Minutes for 16 January 2008 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Subscribe

    Subscribe to rakudo.org

Powered by Movable Type 4.1
Technorati Profile