Type-declarations

An abstract type can be introduced either by a synonym-declaration, in which case the type-name merely stands for the type-declarer in its definition, or by a type-declaration (see following section), in which case it is to be distinguished from the type-declarer in its definition. In both cases it is represented by a (bold) type-name.

A type-declaration gives a type-name to a type-declarer, its realization. In the packet in which the abstract type is defined, the concretizer CONCR may be used to convert an object of that type to the type of the realization. In that packet, selection and subscription also have access to the realization of a type. Outside its defining packet, an abstract type is elementary and there is no direct way to access its realization (but this may be achieved indirectly, by the use of algorithms defined in the same packet as the type). Because of these stringent restrictions on the visibility of the realization, type-declarations are much more suitable for Bottom-Up and modular programming than the synonym-declarations, which are intended for Top-Down programming.

(315,060) (000,050)type-declaration (000,030)(1,0)030030TYPE (1,0)030060type-name (1,0)030010= (1,0)030060type-declarer (1,0)030 (285,020)(20,20)[r] (285,010)(-1,0)030 (085,010)(1,0)16010, (085,020)(20,20)[l]