From: ara.t.howard@... Date: 2006-07-14T07:43:52+09:00 Subject: Re: Choosing among object/class/module/top-level methods... On Fri, 14 Jul 2006, Sam Kong wrote: > I'm a big fan of Object-orientation. But if the object's life-span is as > short as Solver.new(problem).solve, I'm really hesitant to create an object > when a simple method call will do. Am I thinking of a worthless subjective > thing? > > Do you have any criteria about going for object/class/module/top-level > methods? in all seriousness this is __precisely__ why i just wrote the prototype library - i was just facing this question (again) yesterday and couldn't stand it anymore. now i can write solver = prototype{ @some_instance_var def solve something @some_instance_var end def something arg end } eh voila! check it out and let me know what you think - it really is designed for exactly this purpose. btw - i'll be making a new release later today which is cleaned up a lot but only adds one small new feature so the current one, though messy, should be fine to play with regarding functionality. cheers. -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama