Simulating sub types

Meta jared771 at gmail.com
Fri Aug 2 05:29:00 PDT 2013


On Friday, 2 August 2013 at 11:47:46 UTC, bearophile wrote:
> JS:
>
>> the fact remains that I can't do it in Dlang.
>
> Is tagging the inner class as static helping?
>
> class A {
>     static class B { ... }
> }
>
> Bye,
> bearophile

Just to be clear, marking the inner class as static means that B 
will not have a pointer to A. It is the same as defining B 
outside A, the difference being that B is not visible to anything 
outside the module.


More information about the Digitalmars-d-learn mailing list