DIP 1024--Shared Atomics--Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Fri Oct 4 03:34:00 UTC 2019


On 10/1/2019 1:54 PM, rikki cattermole wrote:
> On 02/10/2019 9:31 AM, Walter Bright wrote:
>> On 10/1/2019 4:21 AM, rikki cattermole wrote:
>>> This DIP will need to detail how it does (and doesn't) interact with methods 
>>> with the shared attribute on it, along with examples of the shared qualifier 
>>> on a struct/class.
>>
>> The DIP does not change how `shared` is part of the type system, and does not 
>> change how `shared` affects the types of structs or classes or instances of them.
> 
> Okay, if we get a statement to that affect in the DIP, maybe with an example 
> then nobody can interpret it wrong :)

Ok.


>>> As it stands, if I was to implement it, I could interpret the DIP to only 
>>> affect globals.
>>
>> `shared` isn't a storage class, it's a type constructor, so I don't see how 
>> you could infer that.
> 
> Okay in that case, the spec needs updating. Because right now it is listed as 
> part of `StorageClass` along with `const`.

While const appears in the grammar as a storage class, mainly for programmer 
convenience, it is a type constructor.


More information about the Digitalmars-d mailing list