September 10, 2003
"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:bi2ib7$3015$1@digitaldaemon.com...
> Walter wrote:
> > "Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:bh62vo$21bt$1@digitaldaemon.com...
> >
> >>In what way do you interpret the assert such that it would cause a hardware exception?  The only way to cause a hardware exception is to dereference the null pointer (reference, sorry).  Why would you do that in an assert?
> >
> >
> > An assert on an object reference calls the invariant for that object. If
the
> > reference is null, it'll gp fault.
>
> Ok, that sounds reasonable.  But is there any reason why it shouldn't check against null first?  We are in debug mode, so performance isn't (as much of) an issue.

Why bother if the hardware does it for you?


1 2
Next ›   Last »