Type members (ref)
From Nemerle Homepage
The following fields are allowed in class, module and variant body:
Contents |
Field definition
Unless the optional mutable attribute is used,
the field can be modified only inside the constructor.
Property definition
The fields defined in a property are local for it, they cannot be
referenced outside the property.
Event definition
Interface member
Keyword new is necessary when the declared method hides the
inherited one from another interface.
Method definition
This is a definition of method within class or module. Program entry
point is method static Main.
Operator definition
Operator definitions must have the static attribute. The name
of method must be simply any valid OPERATOR, which can be then
used (as a prefix or unary operator) on expressions of type specified
by parameters.
Method header
The declaration of a polymorphic method needs its type variables listed
after the identifier.
This is a declaration of method. Unlike in C#, the type is specified
after the parameters list.
A special method named this specifies a constructor. This declaration cannot contain the method type and the method has to have type void.
Method parameters
A method parameter is a pair consisting of identifier or _
and its type specification. Type declaration can be omitted in local
functions definitions.
Method parameters are comma-separated list of parameter specification.
Method body
Body of a method can be empty, or be a block.