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

Vladimir Panteleev thecybershadow.lists at gmail.com
Thu Jan 1 09:10:09 UTC 2026


On Thursday, 1 January 2026 at 06:15:09 UTC, Walter Bright wrote:
> Thoughts?

I don't think so. An expression which calculates a `size_t` (or 
`ptrdiff_t`) value without side effects is memory-safe.

What you do with the index (valid or not) would be scrutinized by 
the usual rules.



More information about the Digitalmars-d mailing list