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

forkit forkit at gmail.com
Mon Jun 6 01:23:41 UTC 2022


On Monday, 6 June 2022 at 01:05:44 UTC, forkit wrote:
>

I think this statement differentiates the C++ approach, to D's 
approach:

C++ approach: "Use a member when you can, and a friend when you 
have to."
https://isocpp.org/wiki/faq/friends

D approach: What nonsense! Why keep private things private! Just 
make everything a friend.



More information about the Digitalmars-d mailing list