From: Austin Ziegler Date: 2007-10-09T13:08:19+09:00 Subject: Re: The Case for Multiple-Inheritance On 10/8/07, Todd Benson wrote: > On 10/8/07, Austin Ziegler wrote: >> On 10/8/07, Martin DeMello wrote: >>> On 10/8/07, Austin Ziegler wrote: >>>> Wrong. Look VERY CAREFULLY at your code, Trans. How many of your >>>> modules are used in more than one place? >>>> >>>> If the answer is few, then you're doing it wrong and you're >>>> introducing negative consequences in terms of maintainability, >>>> while not actually increasing reuse. Most methods are specific >>>> behaviour for a given state. Pretending that by extracting that >>>> into modules that youre increasing reuse is nonsense. Unless you're >>>> actually reusing the code, you're not increasing reuse. >>> Here I have to disagree. This is from some actual code I've written: >> [snip] > [double snip] > > I would, I think, do it differently than either of you. I suppose I'm > wrong then? If that's what you've taken out of the discussion, then you need to work on your reading comprehension. There are many ways to implement similar functionality. Some ways are better than others. Some ways abuse facilities that weren't meant for that. Some ways feel "native" to the language. And sometimes that's not an important feature. But there's definite code smell if all you do is what Trans does with respect to composing classes exclusively from modules. I certainly wouldn't want to maintain it. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca