It looks like a nice shortcut for those times when you are registering simple one-off listeners.
While it does provide a nice shortcut I can see reasons why that shortcut might be bad(in some cases). Separating registering and implementation can be a good thing. *Split the logic. *Organise files/classes nicely *Enable inheritance from the listeners If it was anything that I had to maintain or touch regularly I would be happier with a class. Can/Could you support mixins inside FunctionalStruct? That would help overcome some of those points. I can think of a couple of places that I would be happy using FunctionalStruct. Is the source for 'FunctionalStruct' written/available? -- Joseph Wilk http://www.joesniff.co.uk Mark Wilden wrote: > On Tue, Aug 12, 2008 at 9:54 PM, Zach Dennis <[EMAIL PROTECTED]> > wrote: > > >> There is nothing wrong with this, but there are times when it feels >> dirty and unnecessary to create yet another class with some methods > > > The proposed solution looks very nice, but I've never been convinced by > the > "yet another class" argument. It's not like you're only allowed a > certain > number. > > That hasn't always been the case, however. When I worked at Sierra > On-Line > in the early '90s, I broke the compiler of our proprietary OOP language > because I exceeded its maximum class count. Those were the days...:) > > ///ark -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users