in reply to RE: RE (tilly) 1: Object Heirarchy / Design
in thread Object Heirarchy / Design

As tilly wrote: Obj::Input::Type doesn't need to inherit from Obj. If those "utility" functions are needed by both Obj::Input::Type and Obj, then they should be broken out of Obj and moved into their own utility class.

I don't know what your "utility" methods are (perhaps you mean logging, etc.), but my personal preference is this: if from a logical perspective it doesn't make sense to have them methods of Obj, then they shouldn't be declared as methods of Obj. In my opinion, it doesn't make sense for an Obj to have a "log" method. Why should it? How is "log" acting on, or acting with, or have anything to do with an Obj object? I don't think it does. If you come at it from that perspective, I think it may be a bit clearer what methods belong in what classes.

  • Comment on RE: RE: RE (tilly) 1: Object Heirarchy / Design