On Saturday 07 Jun 2003 6:45 pm, Guillaume Laurent wrote:
> On Saturday 07 June 2003 14:00, Levi Burton wrote:
> > So, basically checking every assumption that *pointer is not null
> > with an assert().  I am guessing thats a shit-load of work.

I think most of the work is in finding the places where it would 
actually make sense to assert (for example, there's no point in 
testing a pointer if you've just got it back from new(), there's no 
point in testing a pointer merely for an assert if you're just about 
to dereference it anyway, etc).  If you're going to put in that 
effort, you might as well simply do a better job of recovering 
correctly from such problems, rather than just asserting.

Asserts are handy in some circumstances, but they're more something 
you write as you write the code than something you work to add 
afterwards.  And they can cause problems -- I have twice recently had 
to remove asserts because they were causing crashes in cases where 
the assumption they were testing was not in fact true any more (i.e. 
a null value was actually acceptable, or whatever).

> I don't mean to
> brag but I agree with Rich, given our features list our stability
> is fairly good.

Given that this thread was inspired by a comment of mine about how our 
code could use some improvement, I think the subject is certainly 
fair game.  I just don't think assert is quite the answer.


Chris



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to