Should (p - q) be disallowed in @safe code?

Timon Gehr timon.gehr at gmx.ch
Thu Jan 1 20:58:33 UTC 2026


On 1/1/26 18:56, Paul Backus wrote:
> 
> Pointer *subtraction* is allowed in @safe code because the result is an 
> integer, and all integers are [safe values][1].

There are plenty of unsafe operations whose result is considered to be 
an integer by the type checker, so I don't think this justification is 
sufficient.


More information about the Digitalmars-d mailing list