good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Personally, I think that going for this kind of hard encapsulation is self-defeating. The whole point of OOP is to decouple your code. If your colleague is violating this decoupling, then it is incumbent upon you to educate your colleague. We've had this discussion before but I just can't let it go :-) I agree when the violation is deliberate. The problem with the "normal" perl OO model is that you can interfere accidentally with "private" methods and attribute. Even if they completely stick to the documented API they can be bitten if there is a change to the private implementation if it is done in the naive perl OO style. The good news is that, in my experience, it doesn't happen very often. However, I'm still very much looking forward to being able to get around this nicely when perl6 hits the streets. In reply to Re^2: Encapsulation through stringification - a variation on flyweight objects
by adrianh
|
|