List of types
You write the program body as a class (the shape of a program).
Otherwise, when you define your own type, you use one of struct, record, enum, interface, or union.
class is supported for declaration only; creating one or reading and writing it errors
(struct and record).
Pages per type
Section titled “Pages per type”| Page | Forms that compile | Forms that don’t compile | Contents |
|---|---|---|---|
| Primitive types | 5 | 1 | |
| Arrays | 53 | 15 | An array holds a fixed number of values of the same type, decided in advance. |
| Enums | 7 | 4 | |
| struct and record | 36 | 7 | |
| Tuples | 10 | 4 | |
| union (sum type) | 8 | 4 | A union is a base declared with abstract record, together with the record types that inherit from it. |
| Generics | 29 | 11 | |
| Interfaces | 23 | 9 |