Types of Data Classes

Four types of data classes are distinguished:

User-defined methods can be added for any data class, while user-defined instance variables are not allowed for permanent classes. Subclasses are not allowed for primitive classes. Instances of data classes can be created using new, except in case of primitive classes. For primitive classes and Strings, the syntactic representation allows identifying, respectively creating new instances.

A type C associated with data class C consists of the constant nil and all instances of data class C and all its subclasses.