On 7/11/2016 10:15 PM, Shachar Shemesh wrote:
D says any such cast is UB.
That's why such casts are not allowed in @safe code. There's also no way to write a storage allocator in @safe code.
Code that is not checkably safe is needed in real world programming. The difference between D and C++ here is that D provides a means of marking such code as unsafe so the rest can be checkably safe, and C++ does not.
