import concerns (was Re: Historical language survey)

Derek Parnell derek at psych.ward
Sat Jul 8 01:09:49 PDT 2006


On Sat, 08 Jul 2006 16:11:19 +1000, Walter Bright  
<newshound at digitalmars.com> wrote:

> kris wrote:
>> So, in D, what does private actually mean? The verbose version if you  
>> wouldn't mind, with all known corner-cases noted?
>>  I think the full explanation would help a lot, since it's often easier  
>> to remember the things one should not do, rather than those one should.
>
> It means the same thing as in C++. It should give an error if you try to  
> access a private member in another module - but the symbol is still  
> found.


But currently it doesn't so does that mean currently DMD has this as a bug  
in it?

-----mod.d----
private int foo;

----test.d----
import foo;

int x = foo.x; // access to a private member is allowed but it shouldn't  
be!!!


-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d mailing list