Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-04-12 22:57:59


----- Original Message -----
From: "Gary Powell" <Gary.Powell_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, April 11, 2001 9:50 AM
Subject: RE: [boost] any_function (callback) library

> The idea that released products should crash is one that needs to be
tossed.
> But hey I write games and if you lose your character, because I wrote
buggy
> code, its just an excuse for you to play another 1K hrs and build it up
> again. No seriously, if you can afford the code space, not crashing is the
> way to go. That's heart monitors, games, airplane control systems. Come to
> think of it, there are no computer programs in which a released version
> should just crash. Shut down with a "I can't go on" is so much nicer.
> Sometimes you can actually do something useful on the way out.

Exceptions, more often than not, are a way of avoiding responsibility. If a
programmer sees that a function throws an exception, so he never checks for
pre-conditions, doesn't catch the exception (except in some meaningless
'catch (...)' clause in 'main'), and the program terminates in a way that
differs from a segmentation fault only by the error message (which is less
helpful). This is assuming that the exception isn't caught and ignored,
causing the program to keep running on corrupt data which is eventually
saved to disk, ruining years of work or worse.

A released program should be *correct*. If you dereference a null pointer,
your program is incorrect *and* your safety checks failed. At that point,
you deserve what you get - the more painful, the better.

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk