On Understanding Data Abstractions
lambda-the-ultimate.org
lambda-the-ultimate.org
"An abstract data type is a structure that implements a new type by hiding the representation of the type and supplying operations to manipulate its values."
"An object is a value exporting a procedural interface to data or behavior."
It then goes on to conclude that it is wrong to say that an object is a kind of abstract data type. Could someone summarize the actual differences between Abstract Data Types and Objects? Or is it just a matter of cocktail party semantics?
ADTs define new fundamental types in the algebraic sense. The new type is fundamental in the sense that one can describe the operations performed on it formally. When you look at an operation on an ADT, you can formally describe what the results should be.
Objects do not define new types. Rather, they define operations on existing types. You also don't necessarily know by looking at an operation what will happen; what happens is decided dynamically.