On 2007-01-08, hg <[EMAIL PROTECTED]> wrote:
> 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 ?

In C one uses the pointer to opaque struct idiom to hide data.
For example, the standard FILE pointer.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to