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

forkit forkit at gmail.com
Thu Jun 9 05:45:21 UTC 2022


On Thursday, 9 June 2022 at 04:52:13 UTC, Ola Fosheim Grøstad 
wrote:
>
> ....
> What forkit asks for isn’t unreasonable, the syntax was 
> unreasonable.
>

putting aside the idea of this every being accepted....

as far as syntax goes... i still think an @annotation, rather 
than a word, or a new word, is the best approach. An annotation 
seems very consistent with the D style to me.

class myClass
{
   @self private string secret;
}



More information about the Digitalmars-d mailing list