Path: utzoo!attcan!uunet!mcvax!enea!naggum!isncr!m2cs!frode From: frode@m2cs.naggum.se (Frode Odegard) Newsgroups: comp.lang.misc Subject: Re: object oriented design decision Summary: The trouble with multiple inheritance is perhaps an increased danger of structure breakdown Message-ID: <110@m2cs.naggum.se> Date: 20 Nov 88 23:04:17 GMT References: <4086@enea.se> Organization: Modula-2 CASE Systems A.S, Oslo, Norway Lines: 57 In article <4086@enea.se>, sommar@enea.se (Erland Sommarskog) writes: > > I fail to see what is bad with multiple inheritance. If I want to > store an object in a tree and a linked list simultaneously, what is > wrong with my class structure? > > -- > Erland Sommarskog > ENEA Data, Stockholm > sommar@enea.se > A radio station is a four-letter word. Some people are worried about the dependency problems and structure implications of allowing multiple inheritance. To my knowledge, Eiffel is the only commercial system which supports multiple inheritance [except LISP-based systems?] and it will be interesting to see if the reactions will continue to be so positive as they've claimed them to be so far.. The company I work for is developing an advanced Modula-2 environment where a lot of the effort in supporting large-scale projects (i.e. multi-site, 200,000+ loc etc..) has gone into designing formal notations for defining architecture and dependency demands which go beyond the scope of the Modula-2 itself. I guess the conclusion we've reached is that it is easier to solve structural problems (like dependency management) when the language is simple, rather than have a HUGE language for which it is difficult to build an equally powerful environment [look at Ada: only Rational has been able to come up with a decent environment, and that's 2 million lines of Ada code, they claim]. The OOP fever has many similarities to the RISC fever. People seem to think that as long as something is O-O it is good. This is simply not true. Using notations which support refinement and extension of previously written software components is going to help you in terms of productivity, but you're still going to get maintenance problems and in an environment like Smalltalk, you just don't go in and fiddle too much with class dependencies :-) National Semiconductor (which hasn't announced any RISC processor yet) has stated that "RISC is a technology - not a product". Perhaps it is time to be more rational about OOP, too. OOP is a new approach to problem-solving, it's exciting, but it's not the only way of getting good results. Sometimes it can be worth the trouble to mix O-O approaches with others. Our Modula-2 environment, for example, is based around a distributed object-oriented database, but we didn't create an O-O database *programming* language. There's a new notation for declaring database classes, but the methods are implemented in standard Modula-2. Sigh..I know...I know...not of all this deals with multiple inheritance, but I got kinda carried away. See U all on the bit-stream! - Frode