struct's fields are all public? no access control?

Adam D. Ruppe destructionator at gmail.com
Fri Apr 2 15:42:19 UTC 2021


On Friday, 2 April 2021 at 15:35:03 UTC, mw wrote:
> Is this a compiler bug, or by language design?

https://dlang.org/spec/attribute.html#visibility_attributes

"Symbols with private visibility can only be accessed from within 
the same module. Private member functions are implicitly final 
and cannot be overridden."


Key word there being "module".


More information about the Digitalmars-d mailing list