Path: utzoo!attcan!uunet!husc6!rutgers!att!ulysses!hector!jss From: jss@hector.UUCP (Jerry Schwarz) Newsgroups: comp.lang.c++ Subject: Re: C++, Objectivce-C and projects.. Message-ID: <10854@ulysses.homer.nj.att.com> Date: 14 Nov 88 18:15:26 GMT References: <5155@thorin.cs.unc.edu> <6639@spool.cs.wisc.edu> <5263@thorin.cs.unc.edu> Sender: netnews@ulysses.homer.nj.att.com Reply-To: jss@hector.UUCP (Jerry Schwarz) Organization: AT&T Bell Laboratories Lines: 29 In article <5263@thorin.cs.unc.edu> coggins@cs.unc.edu (Dr. James Coggins) writes: > >This is an interesting comment since the (in-person) discussion that >led to my original posting arrived at a concensus that C++ classes are >NOT ADTs and that Smalltalk classes are closer to ADTs. > >(an ADT consists of data, procedures, and axioms that define consistent >states of the structure. Most discussions and all implementations forget >about the axioms.) > I do not think this is a correct description of Abstract Data Types. The usual presentations of ADT involve axioms (commonly in the form of equations) that say something about the abstract values and do not refer to the internal state of data structures. There will also be some way of relating the "concrete" representation to the "abstract" value being represented. The aspect that most clearly distinguishes ADT from OO is that using an ADT approach one does not define operations that modify the state of a value. (It makes no more sense to modify the state of an abstract value than it does to modify the number 2.) For the record, I believe both ADT and OO, (and some other programming frameworks I won't name here) are each appropriate for certain problems. One of the attractive aspects of C++ is that it allows a wide variety of approaches to be used efficiently. Jerry Schwarz AT&T Bell Labs, Murray Hill