class Person {
def Person(...) = <constructor-body>;
def foo() = ...;
};
No static methods.
Operator overloading as defining methods which can have various names:
class List {
def List() = {
val data = Nil;
}
def appended(other) = <new linked list>;
def ::(other) = appended(other);
}
Further analysis should be done if it is even possible (if the grammar allows it).
Lets try to avoid this keyword, first lookup methods in class, then elsewhere.
No inheritance. Inheritance is good for polymorphism, otherwise composition will suffice.
Add classes to the language.
No static methods.
Operator overloading as defining methods which can have various names:
Further analysis should be done if it is even possible (if the grammar allows it).
Lets try to avoid
this
keyword, first lookup methods in class, then elsewhere. No inheritance. Inheritance is good for polymorphism, otherwise composition will suffice.