flagging runtime null dereferencing

Stewart Gordon smjg_1998 at yahoo.com
Sat Nov 15 10:58:05 PST 2008


"Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message 
news:gfkui3$228r$1 at digitalmars.com...
>I know this has been brought up many times, but I think possibly the 
>usefulness of this feature has been underestimated, and its cost 
>overestimated.

I agree.

<snip>
> 3. check for null can easily be removed during release mode, especially if 
> it translates directly into an assert.
<snip>

NullDerefError (or whatever we end up calling it) should probably be a 
separate exception class, just like the existing ArrayBoundsError and 
SwitchError.  These are all things that are omitted when compiling in 
release mode.

Stewart.

-- 
My e-mail address is valid but not my primary mailbox.  Please keep replies 
on the 'group where everybody may benefit. 




More information about the Digitalmars-d mailing list