home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!ux1.cso.uiuc.edu!m.cs.uiuc.edu!johnson
- From: johnson@m.cs.uiuc.edu (Ralph Johnson)
- Subject: Re: O.M() versus M(O) notation
- Message-ID: <1992Aug21.025530.19949@m.cs.uiuc.edu>
- Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
- References: <1992Aug5.162329.22871@ucunix.san.uc.edu> <PCG.92Aug12205741@aberdb.aber.ac.uk> <__5mtrq.objsys@netcom.com> <PCG.92Aug14170701@aberdb.aber.ac.uk> <1992Aug15.124149.28538@m.cs.uiuc.edu> <PCG.92Aug16184526@aberdb.aber.ac.uk> <1992Aug16.212818.29943@m.c <PCG.92Aug21014009@aberdb.aber.ac.uk>
- Date: Fri, 21 Aug 1992 02:55:30 GMT
- Lines: 35
-
- pcg@aber.ac.uk (Piercarlo Grandi) writes:
-
- >So, here you seem to be saying that abstract classes in most OO
- >languages are a considerable mess, because they *ought* to be used as a
- >poor man's template facility, and then end up being used as a poor man's
- >interface definition facility too.
-
- No, that is not what I am saying. They are a good template facility.
- They are all the template facility that Smalltalk needs. C++ needs
- "templates" in addition to abstract classes, so they are perhaps not
- as good for languages with static type checking. They are not a good
- interface definition facility, it is true. Or, even if it isn't true,
- I believe it!
-
- >Which is exactly about my point, incidentally. Why not separate
- >interface defining, generic defining, and class assembling into three
- >separate facilities? Then your 'abstract classes' would have no reason
- >to exist, and inheritance as well.
-
- Lots of people, including me, have argued for a long time that interface
- defining and class assembling should be separate facilities. I call the
- relationship between interfaces subtyping, and the relationship between
- classes subclassing. You are not going to get rid of inheritance, you
- are just going to call it by a different name. Moreover, you are not
- going to get rid of abstract classes, either. Abstract classes are an
- important design technique. Abstract classes are more powerful than
- templates because you can do more than just fill in the missing
- operations, you can also redefine the operations that are provided.
- Thus, the provided operations all become defaults that a new subclass
- can replace with a more efficient version.
-
- Ralph Johnson -- University of Illinois at Urbana-Champaign
-
-
-
-