4 ms·
On Understanding Data Abstractions
- nkurz 17y agoI've skimmed the paper (http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf) and all I'm seeing are semantic games: "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?
- scott_s 17y agoI've read through most of the paper, and I admit my grasp is tenuous as well. Here's the best I can do: 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.
- deleted 17y ago[deleted]