ኮር - ለፐርል አማራጭ OOP ስርዓት

የኮር እና የሙስ ንጽጽር እነሆ። የኮድ ምሳሌ፡

የክፍል ነጥብ {
has ($x, $y) :reader :writer :new :isa(Int);

ዘዴ ግልጽ() {
($x፣ $y) = (0፣ 0)፤
}
}

ክፍል Point3D isa Point {
አለው $z :reader :writer :new :isa(Int);

ዘዴ ግልጽ() {
$self->next::method;
$z = 0;
}
}

ምንጭ: linux.org.ru

አስተያየት ያክሉ