12. Slots

Overview

Types are composed of uniquely named slots. Slots define the state and behavior of the object oriented type. There are two types of slots:

Slot Modifiers

Slots may be annotated with one of the following modifiers:

Protection

A slot can be annotated with one of the following modifiers to define its visibility:

  • public: everyone can access the slot
  • protected: only subclasses and types within declaring pod can access the slot
  • internal: only types within the declaring pod can access the slot
  • private: only declaring type can access the slot

If no protection keyword is specified, the slot defaults to public.