On Sun, Apr 6, 2008 at 6:18 AM,
<tstarling(a)svn.wikimedia.org> wrote:
* Use protected instead of private. Private
should not be used ever.
That's a pretty strong statement. If you use protected, you can't
freely change around the methods unless you're sure nobody's actually
extended the class (in which case, what harm would there have been in
using private to start with?). If you use private, you can always
change it to protected later if it's useful, but not vice versa.
That's what grep is for.
I'm generally against visibility/access control in object oriented
programming. Protected is a compromise.
-- Tim Starling