Class Definitions

Classes are declared using the class keyword followed by the classname.
The class may have any of the usual access modifiers.
The Superclass inheritance and Interface conformance are indicated with the inherits and implements keywords.

Interfaces

Interfaces are declared in much the same way except the keyword is interface and method and property bodies are not defined.
Interface hierarchies (SuperInterfaces) can also be specified using inherits

Method Grammar

The initializer or constructor method of a class is a special method called init which is implicitly called when a class instance is constructed.
Its responsible for setting the contents of a class instance to an initial state.
It doesnt return any value and is not inherited (i.e baseclass initialization must be done with an explicit call to
a baseclass constructor).

If an init method is not specified the compiler runtime generates a noArg constructor that does nothing.

Constructor chaining can be done to another constructor in the same class (usually with a different number or Type of args)
or to a Superclass constructor (using base.init) - this call must be the first executable line in the init method.

Method Parameter List

A parameter list is a comma separated list of name (and optionally type and parameter description modifier) specifications

<paramName> [as [<paramDesc>] <Type>] [, ...]

<paramDesc> is optional and may be vari and/or a parameter direction indicator out or inout ( default if unspecified is in)

vari indicates the parameter name is a placeholder for a variable length arglist. Within the method this may be unpacked/accessed as a list.

in (implicit) Args are only passed into the method. Any changes made to the argument inside the method are not visible outside the method (pass-by-value)

out the arg is returned from the method

inout argument is both passed into the method and (any possibly changed) value is also returned from the method (pass-by-reference)