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

forkit forkit at gmail.com
Wed Jun 8 11:07:39 UTC 2022


On Wednesday, 8 June 2022 at 11:02:45 UTC, Ola Fosheim Grøstad 
wrote:
> On Wednesday, 8 June 2022 at 10:30:59 UTC, Ola Fosheim Grøstad 
> wrote:
>> They would also ask what "private class" means. If you are 
>> gonna do it, do at least propose a proper keyword for it: 
>> local, hidden, internal…
>
> Btw, the original OOP syntax from Simula is **HIDDEN** and 
> **PROTECTED**. So there is some precedent for this.

I wouldn't object to 'hidden int x'.

This would solve the problem of 'private (this)' and 'private 
this()' being too close syntactically.


More information about the Digitalmars-d mailing list