eigercs
1.0.0
該語言還沒有穩定的發行版,但是您仍然可以從源頭構建
class Person
let private name
let private surname
~ constructor
func new(name, surname)
this.name = name
this.surname = surname
end
func Introduction()
emitln("I am " + this.name + " " + this.surname + "!")
end
func Greet(other)
emitln(this.name + " greeted " + other.name + "!")
end
end
let px = Person("Name1", "Surname1")
let py = Person("Name2", "Surname2")
px.Introduction()
py.Introduction()
px.Greet(py)
Person("a","b").Introduction()
這是一個非常簡單的示例,顯示了Eiger的OOP功能