[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Instance Variables: "private" vs "protected"



Although we started with a strong convention of having all instance
variables private, somehow we are now treating them (Smalltalk style)
as protected.  I suspect this was a temporary matter done in order to
get something else working, but I don't know.  So...

Are we all agreed that all instance variables (data members) should be
private (there being no problem nor cost in providing protected
messages for accessing them)?  We don't need to make this change
immediately, but we really should before customers come to rely on a
non-procedural interface to our data.

Speak now or forever hold onto your private members ;->