home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!chx400!bernina!neptune!santas
- From: santas@inf.ethz.ch (Philip Santas)
- Newsgroups: comp.object
- Subject: Re: O.M() versus M(O) notation
- Message-ID: <1992Aug17.224337.1226@neptune.inf.ethz.ch>
- Date: 17 Aug 92 22:43:37 GMT
- References: <1992Aug15.124149.28538@m.cs.uiuc.edu>> <PCG.92Aug16184526@aberdb.aber.ac.uk> <1992Aug16.212818.29943@m.cs.uiuc.edu>
- Sender: news@neptune.inf.ethz.ch (Mr News)
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
- Lines: 62
- Nntp-Posting-Host: spica.inf.ethz.ch
-
-
- In article <1992Aug16.212818.29943@m.cs.uiuc.edu> johnson@m.cs.uiuc.edu (Ralph Johnson) writes:
- >
- >>johnson> An abstract class is much more than just an interface
- >>johnson> specification. It also includes part of the implementation of
- >>johnson> the class, but it has some 'holes' in it that subclasses must
- >>johnson> fill in. It is really a reusable design for subclasses, not an
- >>johnson> interface specification. Of course, in languages without
- >>johnson> separate interface specifications, people use abstract classes
- >>johnson> to make a separate entity in their program that is just
- >>johnson> interface.
- >
- >The purpose of an abstract class is NOT supposed to be to represent
- >an interface. An abstract class represents a skeleton for a class.
- >It is a class that is to be used ONLY by subclassing. A subclass
- >designer creates a subclass by filling in the 'holes', i.e. by
- >"fleshing out" the skeleton. It is true that C++ programmers will
- >create a class that is only interface, with no implementation at all,
- >but that is not the real purpose of an abstract class. An abstract
- >class is implementation, not just interface.
-
- I am sorry, but this clarification, does not make things clearer to me.
- If the abstract class "is NOT supposed to be to represent interface",
- then how can it be "not just interface"? Does it represent interface after all?
- I think that your answer is important here since it seems to represent
- the whole (almost the whole) OO community in this discussion..
-
- Concerning skeleton: is this including both interface and implementation?
- (given Piercarlo's definitions, with which I do not completely agree,
- but for the moment I do not have ready to present something less complicated)
-
- >An abstract class defines some "abstract" or "deferred" methods
- >whose interface is defined, but whose implementation is not.
- >It also defines some "template" methods that are defined in terms
- >of the abstract methods. Subclasses must provide an implementation
- >of each of the abstract methods, and then they can use the template
- >methods that they inherit. This is a very important and common
- >design technique in object-oriented systems. It would be just as
- >useful if languages separated interface from implementations.
-
- If the abstract class _is_ implementation, then why _must_ the subclasses
- redefine the implementation? One has to choose what implemnetation is
- inherited where in the most general way.
-
- Philip Santas
-
- "In an evolving universe those who stand still are really moving backwards"
- --------------------------------------------------------------------------------
- email: santas@inf.ethz.ch Philip Santas
- Mail: Dept. Informatik Department of Computer Science
- ETH-Zentrum Swiss Federal Institute of Technology
- CH-8092 Zurich Zurich, Switzerland
- Switzerland
- Phone: +41-1-2547391
-
-
-
-
-
-
-
-
-