Jeremy Bowers  <[EMAIL PROTECTED]> wrote:
> [ ... ] the Python community, and in general the dynamic language
>community, has become increasingly confident that private variables don't
>solve *real* problems.

Years of writing and maintaining others' C++ and Java code (plus
one year of maintaining Python code and rather more writing) has
led me to believe that there is no justification for truly private
variables. "protected" yes, I can see the argument for, but
denying derived classes full access to your inner workings just
leads to clumsier (less readable and more bug-prone) implementations
derivations. (The same applies to Java's "final".) And it's based on
the hubris that you are a better programmer than anyone who might
want to extend your class and can forsee all circumstances in which
it might be subclassed.

-- 
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to