Difference between __gshared and shared.
via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 8 04:02:17 PDT 2015
On Wednesday, 8 July 2015 at 09:54:01 UTC, ketmar wrote:
> On Wed, 08 Jul 2015 09:43:38 +0000, wobbles wrote:
>
>> Ok, so we should prioritise using 'shared' over __gshared as
>> much as possible. Good to know!
>
> only `shared` is PITA...
I write a fair amount of threaded code myself and must say the
experience with shared has also been horrible. To me, it feels
like an attempt at fixing something in the way we write threaded
code that someone gave up on, and now it's just noise in the
language. I have given up on it too, and am now using only
__gshared. It's fine, but it feels dirty to be using a __
prefixed keyword so often. :)
If I remember correctly, it was also a pain to use most of Phobos
with 'shared' without casting left and right.
More information about the Digitalmars-d
mailing list