Tingali tautan pikeun ngabandingkeun Cor sareng Moose. Kode sampel:
titik kelas {
boga ($ x, $y): pamaca: panulis: anyar: isa (Int);
métode jelas() {
($x, $y ) = ( 0, 0 );
}
}
kelas Point3D nyaéta Point {
boga $z: pamaca: panulis: anyar: isa (Int);
métode jelas() {
$self->next::metode;
$z = 0;
}
}
sumber: linux.org.ru