in reply to Re^2: Private methods
in thread Private methods
Surely by definition, if you can override a method it isn't private :-)
Heh :) Perl is less modest about its private parts. When "private" methods are merely a matter of convention, scalability suffers. You bring this up quite nicely with you _something_else example. If Perl's OO was cleaner, fewer programmers would struggle with the subtle bugs of accidentally overriding private methods. Considered in that light, perhaps all private methods should be implemented via coderefs to ensure that this problem just goes away.
The more I consider OO in Perl, the more I'm inclined to agree with tye's insistence that inheritance should be avoided (at least in Perl).
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Private methods
by adrianh (Chancellor) on Mar 10, 2003 at 09:27 UTC | |
Re^4: Private methods
by Aristotle (Chancellor) on Mar 11, 2003 at 02:57 UTC |