private module declarations

Jarrett Billingsley kb3ctd2 at yahoo.com
Sun Aug 6 19:52:17 PDT 2006


"Tom" <ihate at spam.com> wrote in message 
news:eb60uq$7eo$1 at digitaldaemon.com...
> What are the difficulties of implementing in the language the following?
>
> foo.d
> | private class Bar {...whatever...} // Aux object
> | class Foo {...whatever...}
>
> main.d
> | import foo;
> |
> | void main()
> | {
> |   Foo f = new Foo;
> |   Bar b = new Bar; // Error, private member of foo.d
> |   ...
>
> I would love to see this someday.

I would absolutely love to see this.  I mean, private module members already 
exist - but only for variables and functions.  I've always wanted to be able 
to make aggregate types private to a module. 





More information about the Digitalmars-d mailing list