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

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Jun 7 07:50:27 UTC 2022


On Tuesday, 7 June 2022 at 07:17:29 UTC, zjh wrote:
> We solve small problems before solving big ones. It is easy to 
> `make mistakes` if you try big ones first.

D should solve its «big» problems and ignore «small problems». 
The alternative is to start over from scratch.

If you want «private» to be class only, then change the 
semantics. You could just make «protected» mean access by 
inheritance and module.

No need for an endless stream of additions. If it matters, adjust 
what you've got, don't pile on more pointless details.

(In this case it doesn't matter much, so leave it as it is.)



More information about the Digitalmars-d mailing list