D1.5 anyone?

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Apr 12 05:36:19 UTC 2023


On Wednesday, 12 April 2023 at 05:10:36 UTC, Walter Bright wrote:
> Consider the following:
>
>     shared int* p;
>
> With transitive shared, that makes p and *p both shared. If I'm 
> understanding your post, you propose changing things so p is 
> shared and *p is not shared.
>
> The issue with that is *p loses what thread it belongs to, and 
> will then (to be thread safe) have to be synchronized.
>
> I agree it is likely easier to write programs this way, but I 
> suspect it will be a lot harder to write correct programs, and 
> the compiler will be unable to help with that.
>

Humanity has been writing concurrent programs even without 
explicit shallow shared for decades now. Together with explicit 
head-shared we are strictly better than status quo.


> I have thought about head const (aka final) many times, but 
> didn't come to any conclusions.




More information about the Digitalmars-d mailing list