Null references (oh no, not again!)

BCS none at anon.com
Wed Mar 4 08:59:27 PST 2009


Hello Walter,

> Rainer Deyke wrote:
> 
>> Writing an assertion for every non-nullable reference argument for
>> every function is tedious.
>> 
> It's also quite unnecessary. The hardware will do it for you, and the
> debugger will tell you where it is.
> 
> The hardware won't help you with array overflows or uninitialized
> variables, however.
> 

Even the best debugger I've ever seen doesn't help if the invalid null assignment 
is 10 call into a call branch that has returned already. Throw in member 
variables (or worse globals) and it gets even worse.

I don't care where a null causes a seg-v, I want to know when that variable 
got assigned to null. 





More information about the Digitalmars-d mailing list