From: Ron Jeffries Date: 2002-02-26T03:24:21+09:00 Subject: Re: Style Question On Mon, 25 Feb 2002 17:01:51 GMT, Paul Brannan wrote: >On Tue, Feb 26, 2002 at 01:04:08AM +0900, Ron Jeffries wrote: >> The top level class (now called Set) needs to be abstract. Concrete >> subclasses will inherit from it or from other concrete subclasses as may >> be appropriate. > >How does an abstract class differ from a module (or mixin)? Very good question. I'll have to think on it, and would welcome advice and discussion. Just thinking out loud here ... The creation methods could be in a module called Set. It might be possible to export no class names at all, the module would just return whatever it thought you needed. I'm not sure if that would be good or bad. What do y'all think? I see mixins as useful for defining a bunch of common methods based on a few primitive methods, in cases where the classes are not necessarily in the same hierarchy. In principle I could do that with my sets, they have little purpose so far in inheriting from each other except to inherit behavior. It seems that mixins are good in cases where you would otherwise need multiple inheritance. Otherwise I'm not clear on when or why I'd use them. So now you know what I don't know ... advise me, world. Thanks, Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.