layout | title | nav_order |
---|---|---|
default |
Queen's Protocol |
2 |
In the effort of implementing real object-oriented applications, the Queen programming language comes with a strict set of rules.
- Any public instance methods should be declared in an interface.
- A class is either abstract or final, no in-between.
- Immutable-first: all instance fields and method parameters are final by default.
- Fields of a class cannot be public (except static constants).
- No static void methods (with the exception of the main method).
- The keywords
class
andimplements
becomeimplementation
andof
respectively. - The keyword
mutable
is introduced (as antonym tofinal
). - No Enums allowed. Enums are actually good in very few cases, yet they encourage shallow and meaningless abstractions.