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.

Reply via email to