Module-level visibility

BCS none at
Tue Feb 16 10:21:50 PST 2010

Hello bearophile,

> I have shown this little program to some of my friends that program in
> Java/C#:
> class Foo {
> private int x;
> }
> void main() {
> Foo f = new Foo;
> f.x = 5;
> }
> When I say them this code compiles with D2 they usually tell me that
> the compiler has a bug.

IMHO: D needs this feature or something like friend in C++. I prefer the 
current solution as it is simpler and I've never run into problems with it 
(and I have with friend).

... <IXOYE><

More information about the Digitalmars-d mailing list