Something needs to happen with shared, and soon.

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Nov 11 11:28:20 PST 2012


On 11/11/12, Alex Rønne Petersen <alex at lycus.org> wrote:
> And finally, the worst part of all of this? People writing code that
> uses shared today are blindly assuming it actually does the right thing.
> It doesn't.

I think most people probably don't even use shared due to lacking
Phobos support. E.g.
http://d.puremagic.com/issues/show_bug.cgi?id=7036

Not even using the write functions worked on shared types until 2.059
(e.g. printing shared arrays).

'shared' has this wonderfully attractive name to it, but apparently it
doesn't have much guarantees? E.g. Walter's comment here:
http://d.puremagic.com/issues/show_bug.cgi?id=8077#c1

So +1 from me just because I have no idea what shared is supposed to
guarantee. I've just stubbornly used __gshared variables because
std.concurrency.send() doesn't accept mutable data. send() doesn't
work with shared either, so I have no clue.. :)


More information about the Digitalmars-d mailing list