Path: utzoo!attcan!uunet!mcsun!ukc!reading!minster!paulb From: paulb@minster.york.ac.uk Newsgroups: comp.object Subject: Re: ADT vs. Objects Message-ID: <658426218.13725@minster.york.ac.uk> Date: 12 Nov 90 16:10:18 GMT Organization: Department of Computer Science, University of York, England Lines: 31 In article <4255@oasys.dt.navy.mil> flitter@atisun.dt.navy.mil (Lance Flitter) writes: > Greetings. I was wondering if someone would venture a good description >of the difference between Abstract Data Types and Objects. Is there a >difference? Is one a subset of the other? This is something that has been discussed quite a bit here at York recently. We reached the conclusion that an object-oriented programming language is basically a superset of abstract data types. A class is an simply abstract data type, and an object is an instantiation of that ADT. Another way of looking at it is to notice that objects are *unique*, i.e. two objects whose instance variables contain the same values are *different* objects, whereas a value in an ADT-language is just a value, and has no existence in it's own right. Whether uniqueness is an advantage or not is, of course, debatable. It certainly causes some problems (just look at the implementation of sets in SmallTalk to see what I mean). My own preference would be for a good ADT language. Paul. +--------------------------+-----------------------------------------------+ |Paul Butcher | JANET: paulb@uk.ac.york.minster | |Dept. of Computer Science | EARN: paulb@minster.york.ac.uk | |University of York | UUNET: ..!uunet!mcsun!ukc!minster!paulb | |York YO1 5DD ENGLAND | ARPA: paulb%york.minster@nsfnet-relay.ac.uk | |Tel: (0904) 432760 | Alternative address: | | (+44 904) 432760 | PRAB1@uk.ac.york | +--------------------------+-----------------------------------------------+ Note: The above are my views, not necessarily those of the department.