Extending D's support for object-oriented design with private(this)

Nick Treleaven nick at geany.org
Fri Apr 26 19:10:22 UTC 2024


On Friday, 26 April 2024 at 07:41:37 UTC, NotYouAgain wrote:
> On Thursday, 25 April 2024 at 13:35:29 UTC, Nick Treleaven 
> wrote:
>> It should say whether __traits(getMember), allMembers and 
>> .tupleof can access private(this) members.
>>
>> private(this) maybe should be the default for synchronized 
>> classes.
>>
>
> Does that mean, that 'private(this)' would solve:
>
> https://issues.dlang.org/show_bug.cgi?id=23158

Yes, if synchronized class members are only allowed to be 
`private(this)`.


More information about the dip.ideas mailing list