If you could make any changes to D, what would they look like?

Paul Backus snarwin at gmail.com
Mon Oct 25 18:12:36 UTC 2021


On Monday, 25 October 2021 at 18:04:19 UTC, IGotD- wrote:
> Then we have the shared structs/classes in D where all basic 
> types are forced to be atomic, which is totally insane.

As far as I know this is not what `shared` does, and not what 
`shared` is intended to do. By itself, `shared` is just a marker 
for data that requires synchronization to access (what [the 
spec][1] calls "shared memory locations"). Whether that 
synchronization is accomplished using atomic operations or 
locking is entirely up to the programmer.

[1]: https://dlang.org/spec/intro.html


More information about the Digitalmars-d mailing list