Using closure in function scope to make "real" private class members
Mike Parker
aldacron at gmail.com
Sat Jun 4 05:13:25 UTC 2022
On Saturday, 4 June 2022 at 05:07:10 UTC, forkit wrote:
> On Saturday, 4 June 2022 at 01:41:52 UTC, Mike Parker wrote:
>>
>> ....
>> It would require adding a new protection keyword to the
>> language. The general policy for that is that there must be a
>> strong benefit. Given that we already have a way to achieve
>> the same goal (putting classes in their own modules), then the
>> benefit of such a keyword is extremely weak.
>
> Well, I've never encounted as much resistance to change, as
> what occurs when someone brings this topic up in a discussion.
>
I'm just expressing my thoughts on the topic. I think it would be
a pointless addition to the language. But if you feel strongly
enough about it, submit a DIP and see how it goes. I'm fairly
confident it will be rejected since we already have a solution,
but I could be wrong. A DIP that's persuasive enough to convince
Walter and Atila is all you need.
More information about the Digitalmars-d
mailing list