Cor jest alternatywnym systemem OOP dla Perla

Oto porównanie Cor i Moose. Przykładowy kod:

klasa Punkt {
ma ( $x, $y ) :czytelnik :pisarz :nowy :isa(Int);

metoda clear() {
( x, y ) = ( 0, 0 );
}
}

klasa Point3D jest punktem {
ma $z :reader :writer :new :isa(Int);

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

Źródło: linux.org.ru

Kup niezawodny hosting dla stron z ochroną DDoS, serwery VPS VDS 🔥 Kup niezawodny hosting stron internetowych z ochroną DDoS, serwery VPS VDS | ProHoster