Cor — alternatiivne OOP süsteem Perlile

Lingil on Cor ja Moose'i võrdlus. Näide koodist:

class Point {
has ( $x, $y ) :reader :writer :new :isa(Int);

method clear () {
( $x, $y ) = ( 0, 0 );
}
}

class Point3D isa Point {
has $z :reader :writer :new :isa(Int);

method clear () {
$self->next::method;
$z = 0;
}
}

Allikas: linux.org.ru

Osta usaldusväärne veebihosting DDoS kaitsega, VPS VDS serverid 🔥 Osta usaldusväärne veebihosting DDoS kaitsega, VPS VDS serverid | ProHoster