<div dir="ltr"><div dir="ltr">On Fri, Jun 5, 2020 at 3:20 AM Walter Bright via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/4/2020 7:44 PM, Manu wrote:<br>
> ...<br>
<br>
Regarding shared,<br>
<br>
     void test(shared(int)* p) { *p = 1; }<br>
<br>
dmd -preview=nosharedaccess test<br>
<br>
     test.d(31): Error: direct access to shared *p is not allowed, see core.atomic<br>
<br>
Isn't that what you wanted?<br></blockquote><div><br></div><div>That's the very very very start of the journey. That change alone only opens the door; but there's open issues relating to initialisation from that change, there's important opportunities with `shared` in conjunction with `scope` (which is what I was arguing for when I was making the case for `scope` as it is today way back in dconf2013, if you can recall those long arguments), and we had a big discussion about how to implement parallel-for (and associated machinery) which you rejected because you found it unacceptable that a library may have to insert fences at the appropriate places rather than the compiler doing it automatically (redundantly) everywhere the pattern emerged. Timon said he thought he knew how to work the proposal into a form you'd find agreeable, but he hasn't replied to me on that recently.</div><div>This was all discussed at length over many months. It kinda just stalled when I fatigued. If we're ready to pick up the ball, that would be really valuable work.</div></div></div>