[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xassert in dispextern.h

From: Miles Bader
Subject: Re: xassert in dispextern.h
Date: Wed, 2 Mar 2005 09:35:48 +0900

>    The right answer is to change those xasserts (and _only_ those) which
>    cause a problem or test something silly or are insanely inefficient
> How do we find and recognize all of those?

Many of them should be obvious -- for instance those which call a
function to do expensive checking should probably be changed to
"gdassert", and those which test array bounds etc should obviously
remain as xassert.

When in doubt, they should remain as xassert, until some more
experience shows otherwise.

The argument for disabling xassert assumes that the majority of them
are superfluous; clearly if this _isn't_ the case then disabling
xassert is a bad idea.

In order to demonstrate that the majority are superfluous, one has to
actually be able to make exactly the same sort of judgement for each
xassert -- so I'm saying, if you can make that judgement, then why not
use it on a case-by-case basis to get the best of both worlds?

If, on the other hand, it's the case that nobody can make that
judgement for most xasserts, then nobody is in a position to say
xassert can safely be disabled either.

Do not taunt Happy Fun Ball.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]