|
![](/i/fill.gif) |
Warp wrote:
> Increased productivity... until the day that you actually need to heavily
> change some module because of new requirements or improvements, and you end
> up breaking thousands of lines of code which are carelessly using public
> members as they please.
In languages other than LISP (say, Python or PHP or whatever), this is
handled by having a naming convention saying what variables are to be
treated as private.
I'm not sure I see the benefit of "I use private: in my C++ classes" to "I
put an underscore before private names in my classes." Other than a touch
of readability (which many C++/Java/etc programs violate by tacking things
like "m_" to the front of every member variable) I don't see a whole lot of
difference.
Certainly if should-be-private members are exposed as public but don't
document to the user which are private, that's a problem.
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
![](/i/fill.gif) |