Synchronized classes have no public members
Nemanja Boric via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 13 00:52:37 PDT 2015
On Tuesday, 13 October 2015 at 06:58:28 UTC, Andrei Alexandrescu
wrote:
> https://github.com/D-Programming-Language/dmd/pull/5188
> implements a rule defined in TDPL: synchronized classes shall
> have no public members.
>
> The motivation behind this limitation is that member accesses
> in synchronized objects should not occur without some handshake
> occurring. Public members would make that possible and easy.
>
> Walter and I are on board with this change. However, it is a
> breaking change so we want to gather a level of community
> support before we push the button.
>
>
> Thanks,
>
> Andrei
While we're talking about this, what about this:
http://www.digitalmars.com/d/archives/digitalmars/D/Module_access_to_private_members_of_synchronized_classes_228775.html
> In the TDPL, on page 419:
> "Not so for synchronized classes, which obey the following
> rules:
- Access to private members is restricted to methods of the
class."
I could rework commits from my experimental branch and submit a
PR?
More information about the Digitalmars-d
mailing list