Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!samsung!munnari.oz.au!mel.dit.csiro.au!yarra!bacchus!matt From: matt@bacchus.esa.oz (Matt Atterbury) Newsgroups: comp.object Subject: Re: ADT vs. Objects Message-ID: Date: 13 Nov 90 23:05:27 GMT References: <4255@oasys.dt.navy.mil> <-283749996@hpcupt1.cup.hp.com> Sender: matt@bacchus.esa.oz Organization: Expert Solutions Australia. Lines: 36 In-reply-to: thomasw@hpcupt1.cup.hp.com's message of 13 Nov 90 01:29:31 GMT In article <-283749996@hpcupt1.cup.hp.com> thomasw@hpcupt1.cup.hp.com (Thomas Wang) writes: My opinion is that: Object oriented language == ADT + inheritance -Thomas Wang (Everything is an object.) Where then is the A in ADT (*ABSTRACT* data type). I see an ADT as a _generic_ (or even _abstract_ :-) description of an object/class/data type. Best examples that come to mind are things in OOSC (Meyer) and Smalltalk, where (eg.) an abstract stack (or queue, or state table, etc) is defined, which *requires* the specifics to be added before it can be used - Eiffel's STACK is useless by itself since you must have of stack of something, so STACK [INT] or STACK [DRAWABLE] etc etc, and this "something" must provide the methods required by the ADT (see Smalltalk's Set where the objects being Set'ed (!) must provide == (or similar)). I would say STACK is an ADT because it is an abstraction of stack, and that INT (perhaps a bad choice since it is 'built in') is NOT. This definition gets a bit murky when talking about (eg.) NUMBER (a superclass of INT) - is it an ADT or an SDT (specific DT for want of a better term) or something in between (my vote). Therefore, I disagree that "OOL == ADT + inheritance" since that means that there are SDTs - no specific classes are defined that actually 'do the work' - like saying all you can have is STACK [SET], when you really need STACK [INT] too. -- ------------------------------------------------------------------------------- Matt Atterbury [matt@bacchus.esa.oz] Expert Solutions Australia, Melbourne UUCP: ...!uunet!munnari!matt@bacchus.esa.oz "klaatu barada nikto" ARPA: matt%bacchus.esa.oz.AU@uunet.UU.NET "life? don't talk to me about life!"