Generality creep

FeepingCreature feepingcreature at gmail.com
Mon Apr 1 07:08:29 UTC 2019


On Sunday, 31 March 2019 at 22:25:30 UTC, Manu wrote:
> Sure. But in the meantime, fix the objective bug with the 
> current semantics where you can read/write un-protected data 
> freely. Right now. Please for the love of god.

Apropos "things to do right now", to derail the thread a little 
in my own interest, could I  again ask to decouple synchronized 
and shared for the time being? There is literally no way to write 
a class that has both threadsafety and invariant-safety right 
now, because D has no way to pull invariants into the class body 
without pulling in the `shared` mess. Look, if I'm using 
synchronized(this), as a rule I don't *care* about shared, 
because I'm inherently using another *kind* of thread safety to 
atomic primitives.

Uncoupling shared from synchronized at the class level would make 
synchronized classes actually usable and useful without 
restructuring the entire class for no gain.



More information about the Digitalmars-d mailing list