in reply to Re: ?Re: RFC: Class::DispatchToAll
in thread RFC: Class::DispatchToAll
Then I call dispatch_to_all('get_fields')
This is where I lost you. If a class has a get_fields, I'd expect it to return all appropriate fields. If it has overridden a base class
method of the same name, then there's a reason for that, so it should either call all the immediate base class methods and derive an appropriate response from that, or simply ignore those and riffle through it's own data to produce the result.
Perhaps you don't get why "extending" and "overriding"
are useful. You are breaking that model. At that point,
don't call it OO programming any more. You are merely aggregating through hierarchies, turning "IS A" into "HAS A" relationships. This will scare every single maintenance programmer that has to look at your code. Please don't do that. All the studies show that most of corporate software money is spent on maintaining, not creating, the software. You have just spent a whole lot more money than you even imagine.
-- Randal L. Schwartz, Perl hacker