more useful options | |
PerlMonks |
Re^3: A different OO approachby Aristotle (Chancellor) |
on Dec 15, 2002 at 13:31 UTC ( [id://219992]=note: print w/replies, xml ) | Need Help?? |
If you can make everyone adhere to your concept then it will indeed work. But that's not a whole lot different from saying that if everyone puts their data in a hash, prepends their attributes with their package name, and uses accessors only, we avoid all the problems. But you don't know if everyone does. With inside out objects, you don't have to care what your superclass does. It can be implemented in any way. Inside out objects always work. Your approach is nice in theory, but violates the principle that classes inheriting from each other should not - and should not have to - know anything about their base class other than the public interface. Makeshifts last the longest.
In Section
Meditations
|
|