A
Alex Martelli
Marc 'BlackJack' Rintsch said: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