Manu's `shared` vs the @trusted promise
Dukc
ajieskola at gmail.com
Tue Oct 23 10:31:25 UTC 2018
On Monday, 22 October 2018 at 14:49:13 UTC, Nicholas Wilson wrote:
> On Monday, 22 October 2018 at 11:24:27 UTC, Dukc wrote:
>> [snip]
>
> For reading, its a size_t so can be done with atomics, writing
> OTOH is a @property that calls a function to reallocate if ned
> be. Reallocation obviously needs to be locked.
True, but I meant that the very concept of array having a length
member violates the strong @trusted rule referred to by the
theard author. That's because somebody could make a @safe
function to the module defining an array that makes the array
unsafe to use (If the array is a struct in DRuntime, that is. I'm
not sure about that.).
More information about the Digitalmars-d
mailing list