DIP 1006 - Preliminary Review Round 1

ag0aep6g anonymous at example.com
Wed Mar 7 13:32:37 UTC 2018


On Wednesday, 7 March 2018 at 08:58:50 UTC, Paolo Invernizzi 
wrote:
> Just to understand, otherwise, if the assert is removed and it 
> does not hold, you are in UB,

You're not. Just let the compiler treat the code as if the 
asserts weren't there. If the resulting code has UB, it won't 
compile, because @safe code is statically checked to not have UB.

> so the request is to guarantee memory safety in a UB state, 
> right?

I don't think anyone is asking for that. The request is for no UB 
in @safe code.


More information about the Digitalmars-d mailing list