Why are class variables public, when marked by the 'private' keyword?

Kirill kirill.saidov at mail.com
Sat Mar 21 05:16:00 UTC 2020

On Saturday, 21 March 2020 at 04:58:32 UTC, Mike Parker wrote:
> In D, the unit of encapsulation is the module. So private means 
> "private to the module", i.e., private members are accessible 
> within the same module. If ID were in a different module from 
> main, you would see an error.

Indeed, I read something like this somewhere... It makes sense to 
me now! Thank you!

More information about the Digitalmars-d-learn mailing list