Newbie initial comments on D language - delegate

Janice Caron caron800 at googlemail.com
Wed Jan 30 23:55:13 PST 2008


On Jan 30, 2008 11:24 PM, Edward Diener
<eddielee_no_spam_here at tropicsoft.com> wrote:
> But it can generate code which checks at run-time if this is the case
> and takes the correct action. In the case of converting a delegate which
> has a non-null value as the object pointer, the code generated if one
> tries to cast it to a plain C function pointer could throw an exception.

Good point.

Along similar lines, the compiler could generate code which checks for
null dereferences, but I don't see that happening anytime soon. :-(

These are exactly the sort of things that ought to be in debug (but
not release) builds (IMO).



More information about the Digitalmars-d mailing list