Objectives

This section raises the issue of abstraction in modeling and programming. It describes by what mathematical means we may model the meaning of abstract data types and introduces the notion of types as constraints. Further, it reflects on the objectives of typed object-oriented programming.

Points to emphasize

Hints

The notion of types as constraints allows for developing increasingly complex mathematical models, capturing syntactical and behavioral properties. It is important to stress that constraints may be expressed in a variety of ways: as equational theories, as higher order types or as logical formulas.

Questions

  1. Characterize the differences between control abstractions and data abstractions. Explain how these two kinds of abstractions may be embodied in programming language constructs.
  2. How can you model the meaning of abstract data types in a mathematical way? Do you know any alternative ways?
  3. Explain how types may affect object-oriented programming.

Comments

Whether one believes in types for OOP or not depends to a certain extent upon ones preferences. Discuss your preferences and explain what trade-offs are involved in the choice for typed versus untyped OOP.