The Problem of Stacks

Consider, for example, trying to create a general purpose Stack data structure. Of all components, data structures would seem to be the the most obvious candidates for development as a reusable abstraction.

The problem is that the stack abstraction has an interface that consists of several procedures. Because the data is shared between each of these procedures, it cannot be local to any of them. It must therefore be global to the procedures. But in a language that has only local and global data (such as FORTRAN or C) the internal data fields, which you would like to hide, must be exposed for the world to see (and perhaps, to modify).

[audio] [real] Text to accompany slide35, in Chapter 1 of An Introduction to Object-Oriented Programming