Why less emphasis on private data?

hg hg at nospam.org
Mon Jan 8 08:40:07 CET 2007


sturlamolden wrote:

> The designers of Java, C++, C#, Ada95, Delphi, etc. seem to think that
> if an object's 'internal' variables or states cannot be kept private,
> programmers get an irresistible temptation to mess with them in
> malicious ways. But if you are that stupid, should you be programming
> in any language? The most widely used language is still C, and there is
> no concept of private data in C either, nor is it needed.


void test(void)
{
  static int i;
}


Do you agree that i is "private" to test ?

hg




More information about the Python-list mailing list