Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:

> In <[EMAIL PROTECTED]>, Isaac
> Rodriguez wrote:
> 
> > But the truth is that C++ and Java made a decision to do that for a
> > reason, and the times when you have to work around those language
> > features come once in a blue moon; they are the exception, not the
> > rule, and you don't implement features in a language, or for that
> > matter in an application, to simplify the exceptions; you try to
> > implement the most common scenarios.
> 
> So the most common scenario is that programmers try to poke around all the
> time in the internals of classes even if the need to do so is
> very rare?  Otherwise it would not be necessary to have and use a
> mechanism to declare everything private.  ;-)
Historically, say in the '70s, it was probably the case that experienced
programmers, trained in a very different environment, had to be nearly
coerced to respect encapsulation; so the enforced encapsulation
mechanisms of languages born at that time may well have been warranted.

Nowadays, I agree with your thesis that having extra mechanisms to
enforce encapsulation is probably supererogatory.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to