From: "Kurt M. Dresner" Date: 2003-08-21T13:37:16+09:00 Subject: Re: One Module for one Class? I suppose it depends on what kind of methods they are - for example, I was very confused when I went looking for the File.exists? method in the File class only to find that it was part of the Filetest mixin. I suppose that class methods like those can be defined in a module. It seems that all instance methods should be explicitly members of the class, though. -Kurt On Thu, Aug 21, 2003 at 01:32:38PM +0900, Jeremy Whetzel wrote: > Hello all! > > I'm planning on playing around with writing some sort of "package > manager" for source based Linux distros or any of the BSDs. I'm > thinking along the lines of Gentoo's portage system or the BSD ports > system. I was toying around with modules with this idea, and I got > to wondering something. If a class needs a lot of different methods, > such as 30 or 40+ methods, and they're all very specific to that class, > does it make sense to pull out a bunch of those methods and put them > into a module and mix them in later, or should they be kept in with the > class? For example, if I have an object that represents a software > tarball, and that object has a number of attributes such as > dependancies, reverse dependancies, comments, versions, etc, and then I > have all the methods that go with it for fetching, configuring, > building, resolving dependancies, etc, would it make more sense to keep > all those methods out of the class or leave them in the class, even > though it would make that class huge? > > I realize it's PROBABLY a matter of taste, but are there any good > reasons to do it one way or another? > > Thanks for any input sent my way... > > Jeremy > >======= End of Original Message =======<