Preparing for the New DIP Process
FairEnough
FairEnough at gmail.com
Sat Jan 27 22:12:11 UTC 2024
On Saturday, 27 January 2024 at 11:42:59 UTC, Sergey wrote:
> On Saturday, 27 January 2024 at 11:17:53 UTC, FairEnough wrote:
>> On Saturday, 27 January 2024 at 08:00:32 UTC, Jordan Wilson
>> wrote:
>>> ..
>>> I suspect the proportion of users that really care about
>>> explicit class privacy and find the workaround of putting a
>>> class that needs such privacy into a separate file untenable,
>>> will remain the same.
>>>
>>> Jordan
>>
>> Or ...they might just add it to a fork of D.
>>
>>
>> "[PR ready] Class-level private (in addition to the current
>> module-level private)"
>>
>> https://dpldocs.info/opend/roadmap.html
>
> I thought you already has fork with this feature enabled.
I integrated these changes into my own fork a long time ago:
https://github.com/dlang/dmd/compare/master...dkorpel:dmd:private-this#diff-8da4a723a20020bf5d1edf1a9f1344eb776c73a0ae35ccee95d3bc24cb0600a7R242
I've never looked back, and never had any issue with this
feature. It's just works.
I prefer to design my class upfront so that it doesn't leak
private mutable state. Not outside of the module, and not inside
of the module.
But should I ever need to leak mutable state into the module, I
can do that as well.
So I have the best of both worlds. Others don't have that, but I
do ;-)
More information about the Digitalmars-d-announce
mailing list