FunctionsTopProgram ControlTypes, Classes and Properties

Types, Classes and Properties

GOO types categorize objects. Types are first class. They are used to annotate bindings. Binding types restrict the type of objects bindable to associated bindings.

GOO supports the following types in order of specificity (with the exact ordering defined in Appendix *):

The basic type protocol is:
 <type> (<any>) C
 isa? (x|<any> y|<type> => <log>) G
 subtype? (x|<type> y|<type> => <log>) G
returns true iff x is a subtype of y.
 new (type|<type> prop-inits|...) G
creation protocol taking type and creation options where prop-inits contains getter / initial value pairs.

  • Singletons
  • Subclasses
  • Unions
  • Product
  • Classes

  • FunctionsTopProgram ControlTypes, Classes and Properties