shared - i need it to be useful

Walter Bright newshound2 at digitalmars.com
Sun Oct 21 09:04:34 UTC 2018


On 10/20/2018 11:30 AM, Manu wrote:
> You can write an invalid program in any imaginable number of ways;
> that's just not an interesting discussion.

What we're discussing is not an invalid program, but what guarantees the type 
system can provide.

D's current type system guarantees that a T* and a shared(T)* do not point to 
the same memory location in @safe code.

To get them to point to the same memory location, you've got to dip into @system 
code, where *you* become responsible for maintaining the guarantees.


More information about the Digitalmars-d mailing list