Sather Home Page

Section 6.5:
Types

The type system of Sather is very much tied up with the class mechanism of the language. Every object in a program has a type - which is the behaviour specified by the implementation of some class - the identity of which is given as the name of that class.

The principal aspect of typing in a Sather program, however, relates to the way in which the language specifies sub-typing and conformance of types in general. The language type model is that of contra-variant type conformance (see 6.5.1)

The inheritance graph defined by abstract classes (one or more of which may be treated as parent by an implementation class) is forbidden to have any circularities in a well-formed program. Note that the type graph only relates to the abstract classes involved in a program, since no class may inherit from an implementation class implementation classes are ignored for the purposes of conformance checking of the type graph.

These two aspects of typing which is fundamental to the language are covered in the following sub-sections -

  1. Type Conformance
  2. Type Graphs

Specification Index Language Index Section 6 Index
Comments or enquiries should be made to Keith Hopper.
Page last modified: Wednesday, 25 October 2000.
Produced with Amaya