Objectives
This section presents a calculus
for existential types.
Existential types are needed
to model information hiding and
data abstraction.
The calculus
extends the calculus presented
in the previous section.
Points to emphasize
- hiding -- existential types
- packages -- abstract data types
Hints
It is important to convey the intuition
that you don't need to know the exact
types of a function and its arguments
as long as you know
that these are structurally consistent.
Questions
.so q5
Comments
The distinction made between
the interface, representation
and contents of a package
reflects the difference in viewpoint
from the client of an object
and the one responsible for implementing it.