An Issue I Wish To Raise Awareness On

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 20 01:56:57 PDT 2017


On Wednesday, 19 July 2017 at 12:56:38 UTC, Marco Leise wrote:
> That's exactly what I was opposing in the other post. These
> handles are opaque and never change their value. Within the
> Dlang language barrier they can be immutable and as such,
> implicitly shared.

Given transitivity of immutability the handle should have the 
same immutability as the resource it represents.

> It sometimes depends on whether a library was
> compiled with multi-threading support or not

Then you can communicate multithreading support with type system.

> and a value type can be copied from and to shared anyways, 
> rendering the safety
> argument void:
>
> 	int x;
> 	shared int y = x;
> 	int z = y;

If it's overlooked, it doesn't mean D can't have proper sharing.


More information about the Digitalmars-d mailing list