Using closure in function scope to make "real" private class members
bauss
jj_1337 at live.dk
Thu Jun 9 10:42:10 UTC 2022
On Thursday, 9 June 2022 at 10:16:06 UTC, Ola Fosheim Grøstad
wrote:
> On Thursday, 9 June 2022 at 09:47:54 UTC, bauss wrote:
>> But perhaps it's better to have `hidden` then anyway since
>> it's much more clear.
>
> You might as well, adding a new protection level might be a
> breaking change thanks to meta-programming.
>
> It is probably possible to write the parser in such a way that
> "hidden" isn't a keyword. At worst it will impact people who
> use a type called "hidden".
Could make it an error when used directly, but a warning when
accessed through traits.
Then deprecate it over time, allowing people to fix their code to
support it.
More information about the Digitalmars-d
mailing list