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

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Jun 8 10:00:37 UTC 2022


On Wednesday, 8 June 2022 at 09:55:00 UTC, bauss wrote:
> Just extend the private access modifier to allow an optional 
> specifier such as class/struct.

I guess this is where ideas about aesthetics, consistency and 
usability differ. My view is that all of the proposed syntaxes 
are bad and would be confusing to people coming to the language. 
All proposal signal that something went wrong and somebody 
patched it up with band-aid and duct-tape.

And you still get one more case to deal with if you want to 
reason about this in meta programming.



More information about the Digitalmars-d mailing list