-preview=in might break code

Adam D. Ruppe destructionator at gmail.com
Sat Oct 3 15:42:11 UTC 2020


On Saturday, 3 October 2020 at 15:21:47 UTC, Ola Fosheim Grøstad 
wrote:
> How come? I thought the current (modern) D semantics is that if 
> you cast away shared the compiler can assume that no other 
> contexts (threads/IRQs) modifies the object?

I don't know the rules for shared... I don't think anyone does.

But the rule for const vs immutable is well known. Passing the 
same thing const on one side and mutable on the other doesn't 
break const, even though it changes - that's exactly expected.


More information about the Digitalmars-d mailing list