Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!johnson From: johnson@m.cs.uiuc.edu Newsgroups: comp.object Subject: Re: OO Ada -- another way Message-ID: <77500062@m.cs.uiuc.edu> Date: 5 Nov 90 04:30:00 GMT References: <90@ Lines: 35 Nf-ID: #R:the clumsy thing is that inheritance is a poor way to achieve reuse of >definition and reuse of implementation, because it ties the two together >in some gluey way, and one has to do funny things like abstract classes >to separate the two. The real problem is not that inheritance is a poor way to reuse implementation, but that it is a poor way to reuse specification. In my opinion, subclassing has little to do with subtyping. Languages like C++ or Eiffel that tie them together then have to struggle with the problems that this creates. This causes programmers to create abstract classes only to get around problems caused by the type checker. However, this is NOT the main purpose of abstract classes. Abstract classes are important because they let you reuse design. Abstract classes replace and are a big advance over program skeletons. Deferred operations are essentially blanks that a subclass implementer fills in, or design decisions that the subclass implementor is told to make. The use of abstract classes as a way to reuse design is very, very important, and language designers should make sure that they understand it will, to make sure that their new languages still support it. For example, I am not sure that Peter's Ada++ design will support it. Can a component defer the definition of operations to its delegators? The 1990 ACM Principles of Programming Language conference had several papers on object-oriented programming, two of which (one was mine) were on the fact that subclassing and subtyping were different. I recommend them to people interested in this question. Ralph Johnson -- University of Illinois at Urbana-Champaign