Synchronized classes have no public members
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 12 23:58:25 PDT 2015
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
More information about the Digitalmars-d
mailing list