Using closure in function scope to make "real" private class members

Adam D Ruppe destructionator at gmail.com
Sat Jun 4 11:33:55 UTC 2022


On Saturday, 4 June 2022 at 11:15:13 UTC, forkit wrote:
> In the end though, encapsulation of a class, in D, is broken, 
> and cannot be statically verified by the compiler

Good OOP code accesses objects through interfaces anyway. The 
class itself ought only be used to construct it.



More information about the Digitalmars-d mailing list