While I agree with this in principle, I'm not sure I agree with the execution.
I think that you'd really want Obj to return an instance of a subclass (e.g. Obj::DB or Obj::FlatFile).
Then you maintain the consistency of the interface -- so that your objects all share the same methods and simply overload them as necessary, but the implementation specific to each type of object occurs in seperate classes/objects.
I thought I remembered seeing something in Fastolfe's node, but I a quick look didn't come up with anything.
In reply to RE: RE: RE: RE: Object Heirarchy / Design
by jreades
in thread Object Heirarchy / Design
by lattice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |