safety: null checks

Ola Fosheim Grostad ola.fosheim.grostad at
Mon Nov 23 01:29:12 UTC 2020

On Monday, 23 November 2020 at 01:04:38 UTC, Paul Backus wrote:
> Please show me the definition of null that requires it to be 
> invalid.

null points to nothing, that is not a valid value for the 
referenced type.

Trivially invalid.

> Please show me the relevant definitions of these terms and 
> explain how they contradict.

What do mean? A crash is by definition undefined behaviour.

The spec does not provide adequate definitions and requirements, 
which is what makes it unsound.

> The implementation allows undefined behavior in @safe code. 
> That means the implementation is incorrect, period. Neither of 
> the possible interpretations of the spec allow this.

The spec isn't well defined or consistent just because people 
claim things in the forum.

More information about the Digitalmars-d mailing list