From: Austin Ziegler Date: 2007-10-07T07:18:32+09:00 Subject: Re: The Case for Multiple-Inheritance On 10/6/07, Sylvain Joyeux wrote: > On Saturday 06 October 2007, MenTaLguY wrote: > > On Sat, 2007-10-06 at 19:17 +0900, Sylvain Joyeux wrote: > > > The bottom line being: if I was to *not* use inheritance for my > > > purposes, I would have to reinvent the "inheritance wheel". > > (The one sticking point I would occasionally hit was delegation, as > See the top of my previous post: you're talking about duck typing, which > does not apply in my case since I *need* to manipulate the models, and I > need (for instance) to be able to check that an objet is kind_of? a > particular class/module. You could, of course, override #kind_of? to do what you want. > > Would you be interested in working a simple example, to see if there are > > other relationships besides "is-a" in your model? > Sorry, I don't think I have the time/motivation for that. I don't mind > discussion (and I don't mind being proved wrong if I learn something in > the process), but I thought a lot about it and *yes* I'm using inheritance > for 'is-a' relations. I'm finishing my PhD write now and I don't have a > lot of time for that. What Mentalguy's suggesting is that the relationships may not be best modeled as an is-a relationship, as I suggested to Trans early on in the discussion. Is-a relationships are very tightly coupled and should only be used where such a tight relationship is warranted. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca