Gweler y ddolen am gymhariaeth o Cor a Moose. Cod sampl:
Pwynt dosbarth {
wedi ( $x, $y ) :darllenydd :ysgrifennwr :new :isa(Int);
dull clir() {
( $x, $y ) = ( 0, 0 );
}
}
dosbarth Pwynt 3D isa Pwynt {
wedi $z :reader :writer :new :isa(Int);
dull clir() {
$self->next::dull;
$z = 0;
}
}
Ffynhonnell: linux.org.ru