jOOPL keywords
Introduction
jOOPL has some reserved keywords. As this library cannot define new JavaScript keywords, these are represented by a dollar ($) symbol and an identifier like this:
Since keywords are variables, there is a chance to change their meaning and this will break jOOPL in an unpredictable way. Be aware to don't reuse jOOPL reserved keywords!
Note:jOOPL works with no problems in conjunction with jQuery and other libraries because the dollar ($) sign in jOOPL is a variable/identifier prefix. In jQuery and others, the dollar sign ($) is a variable itself.
Keywords
| Name | Description |
| $global | Represents the global scope. Starting from 2.0 version of jOOPL, namespaces and classes are child of $global object. This is very important because this avoids adding strange behaviors to the parent and standard Window object. |
| $namespace | Represents an object with methods related to namespace management and registration. |
| $interface | Represents an object with methods related to interface declaration and utilities. |
| $class | Represents an object with methods related to class declaration and utilities. |
| $def | Starting from 2.0 version of jOOPL, $def is the preferred operator/constructor to declare classes (see Classes). |
| $interfacedef | Starting from 2.0 of jOOPL, $interface-def is the preferred operator/constructor to declare interfaces (see Interfaces) |
| this.$base | In the scope of a class constructor, method or property (accessors), represents the access to the instance of the base class, if the current class derives a parent. |
| this.$ctor | In the scope of a class constructor, represents the access to the constructor method. Usually this is accessed through this.$base.$ctor() in order to call the base class constructor, if the current class derives a parent class |
| $new | Represents the operator used to instantiate classes. It is a shortcut to $class.create(...). |
| this.$_ | Every class has a special variable or field $_ which represents the class fields' container. In jOOPL, class' fields are not declared directly in this but in this.$_. |
| this.$_.$derived | this.$_.$derived is a system special field present in any class that provides access to the more derived members of the whole class. This is important for polymorphism, since abstract/virtual (must inherit) members must be accessed through this.$_.$derived. |