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

Walter Bright newshound2 at digitalmars.com
Wed Jun 8 06:56:50 UTC 2022


On 6/7/2022 5:47 AM, forkit wrote:
> Instead, it deliberately, intentionally, proudly, leaves this important aspect 
> in software development to the programmer(s).

Yeah, well, the alternative is "friend" classes, which are an abomination.

The unit of encapsulation in D is the module, not the class.


More information about the Digitalmars-d mailing list