Shouldn't invalid references like this fail at compile time?
Walter Bright
newshound2 at digitalmars.com
Thu Jan 25 02:46:38 UTC 2018
On 1/23/2018 7:22 PM, Jonathan M Davis wrote:
> We need to do that anyway for the overly large
> objects (and unfortunately don't last I heard).
I put a limit in at one time for struct/class sizes to prevent this issue, but
got a lot of pushback on it and it was reverted.
Perhaps we can revisit that - and have large struct/classes be allow only in
non- at safe code.
In general, though, if you don't have struct/class object sizes larger than the
protected memory at null, you're safe with null dereferences.
More information about the Digitalmars-d
mailing list