Go backward to Existential Quantification
Go up to Top
Go forward to Use of Packages
Information Hiding
- Abstract types:
- Unknown type representation.
- Packaged with operations that may be applied to type.
- Another example:
- x: exists a. {const: a, op: a Int}
- x.op(x.const)
- Restrict use of abstract types:
- Simplify type checking.
- value p: exists a. a x (a Int)
= pack[a = Int in a x (a Int)](3, succ)
- Value p is a package
- Type a x (a Int) is the interface.
- Binding a=Int is the type representation.
- General form:
- pack [a = typerep in interface](contents)
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: understand.tex,v 1.1 1996/06/12 09:38:21 schreine Exp schreine