Why D is not popular enough?
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 12 11:34:04 PDT 2016
On Friday, August 12, 2016 13:21:10 Steven Schveighoffer via Digitalmars-d
wrote:
> On 8/12/16 1:04 PM, Jonathan M Davis via Digitalmars-d wrote:
> > Honestly, I don't think that shared is broken.
>
> Yes. It is broken.
>
> shared int x;
> ++x; // error, must use atomicOp.
> x = x + 1; // OK(!)
>
> The thing that is NOT broken is unshared.
>
> There's literally not much you can do with shared, and what you can do
> isn't consistent or useful.
>
> It needs lots of attention.
It does not surprise me in the least if there are bugs related to shared in
the compiler, and we definitely don't deal with it properly in druntime with
regards to stuff like Mutex and Condition. But I don't agree with the idea
that shared is fundamentally broken.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list