Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.object Subject: Re: Inheritance explained... finaly... Message-ID: <135300022@p.cs.uiuc.edu> Date: 13 Jan 90 01:38:06 GMT References: <1130005@gore.com> Lines: 34 Nf-ID: #R:gore.com:1130005:p.cs.uiuc.edu:135300022:000:1752 Nf-From: p.cs.uiuc.edu!johnson Jan 11 21:57:00 1990 I disagree with almost everything that jgk@osc.COM said in his message. >Type system. He then goes on to talk about inheritance. (I guess that I agree that I have yet to see a language which does multiple inheritance cleanly, though Trellis/Owl is pretty good.) His basic mistake is to confuse inheritance with types. This is understandable, because lots of other people do too. However, the problems with single inheritance that he alludes to are easily fixed by a type conformance algorithm that ignores inheritance. Witness Emerald, which does not have inheritance at all. >Multiple arguments. This is a bogus argument. Double dispatching works fine for those cases where you really want to choose a method based on the class of several objects. Most of the time you don't, and messaging works fine. >Side effects. As a matter of fact, I guess I agree with the basic assumption that it would be good to be able to reason about side effects better, but this is not particularly related to object-oriented programming, either in the need or in the solution. I disagree that object orientation includes a vague assumption that messages modify their receivers, but not their parameters. It is common for Smalltalk methods to change the state of their parameters and also for them to not change any state at all. The statement "Certainly any language which doesn't have a concept of a pure function is deficient" is a little odd, since none of the popular languages support this concept as well as they should. The only language I've seen that lets procedures combine arguments that can be changed with those that cannot in a way that I think is flexible enough is FX. I'd appreciate any other pointers to work in this area. Ralph Johnson