D1.5 anyone?

Timon Gehr timon.gehr at gmx.ch
Tue Apr 11 16:53:37 UTC 2023


On 4/11/23 18:43, Timon Gehr wrote:
> 
> - I feel like the story for multithreading in your post is currently 
> almost the least fleshed-out part of it, but maybe something can be 
> designed here. Manu has been in favor of allowing things to implicitly 
> cast to `shared`. With transitive qualifiers this just cannot be safe, 
> but with what you propose I think we can make his vision work. There 
> would still need to be some transitive-ish enforcement. Basically, by 
> default you should not be able to access an un`shared` field of a shared 
> variable. With shared as a storage class, you can actually make 
> variables shared temporarily in a safe manner, exactly in the way that 
> Manu imagined for his safe parallel foreach.

It's not so clear how this would interact with `immutable`.

I guess another complication absent from Scala is that D has structs.


More information about the Digitalmars-d mailing list