I wish all qualifiers were revisited with an eye for simplification
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Aug 3 13:02:48 UTC 2020
On 8/3/20 7:45 AM, Simen Kjærås wrote:
> On Sunday, 2 August 2020 at 20:50:14 UTC, Andrei Alexandrescu wrote:
>> * Nobody - probably not even Timon - knows what "shared" does or is
>> supposed to do and not do. The most I got from Walter ever is "shared
>> is intentionally restricted so you can't do much without a cast". Yet
>> the definition of "much" and the conditions under which casting is
>> legit are not anywhere to be found.
>
> Shared today is a half-baked implementation of a half-thought idea. Manu
> wrote[0] almost two years ago what it should be: you can't read or write
> from a shared object, and only shared methods may be called on it. This
> was made into a DIP[1], and is half-way(?) implemented in the compiler
> as -preview=nosharedaccess. The semantics are effective and easy to
> understand.
>
> --
> Simen
>
> [0]:
> https://forum.dlang.org/post/mailman.4299.1539629222.29801.digitalmars-d@puremagic.com
>
> [1]: https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1024.md
Found out about that after I wrote my diatribe. Thanks!
More information about the Digitalmars-d
mailing list