From: Rick DeNatale Date: 2007-10-09T19:42:26+09:00 Subject: Re: The Case for Multiple-Inheritance On 10/8/07, Mauricio Fernandez wrote: > On Tue, Oct 09, 2007 at 02:00:05AM +0900, Rick DeNatale wrote: > [...] > > In Java/C++ inheritance is primarily a means of expressing type > > relationships, and secondarily a means of sharing implementation. > > Because of the statically typed nature of these languages, related > > types HAVE to be related by inheritance. > [...] > > In a statically typed language the coupling of type specification with > > implementation leads to a particular set of pressures on the design of > > both the language and programs in that language which are different > > from the pressures on Ruby and it's programs. > > This is getting OT, but I just wanted to clarify that not all the languages > with a statically typed OO system confound subclassing and subtyping the way > C++ and Java do. In OCaml, for instance, two unrelated classes can represent > the same type, and a class might not be a subtype of its parent(s). Yes, I suppose I should have used something like "in languages in the C++ (or perhaps to give due credit Simula-67) family..." But I suspect that many of those craving MI come from THAT particular branch of experience. There are certainly statically typed languages which push the envelope on what can be expressed via types, but they also push the design pressures in different directions. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/