Dealing with the interior pointers bug

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 22 06:56:29 PDT 2017


On 06/22/2017 12:34 PM, Boris-Barboris wrote:
> Everything the language allows to compile is allowed by it's type 
> system, or is a bug in the compiler.

No. D is not supposed to be completely verifiable by the compiler.

For example, the type system guarantees that immutable data never 
changes. But the compiler allows you to cast from immutable to mutable 
and change the data. It's an invalid operation, but the compiler is not 
expected to catch that for you.


More information about the Digitalmars-d-learn mailing list