dereferencing null - what about something like an check-scope?

dennis luehring dl.soluz at gmx.net
Thu Mar 8 08:40:23 PST 2012


could it be a good idea to add something like an check-scope for 
modules,functions,etc. for typical fails to easy the detection?

wild-idea-and-syntax-list:
@CheckForNull
@CheckForNaN
@CheckForUnnormalFloat
...

---- x.d

modul x

@CheckForNull // will introduce NullChecks for the complete module

..
..
..

-----

int test()
{
@CheckForNull; // introduces Null-Checks on the function scope
@CheckForNaN; // introduces NaN-Checks on the function scope
    ...very long evil function...
}

total waste of compiler-developer time - or something to make D better 
in the end?







More information about the Digitalmars-d mailing list