On Friday 04 January 2008, Markus Hitter wrote: > Am 03.01.2008 um 15:02 schrieb Paul Brook: > > Having to check every return value is extremely tedious and (as > > you've proved) easy to miss. > > Checking every return value is a measure for programming reliable code.
Never failing is even more reliable. > > If the allocation fails we don't have any viable alternatives, so > > we may as well stop right there. > > Stop != segfault? Yes. > What about a meaningful exit message? "Out of memory" is a fairly comprehensive description of the problem. In fact I'd say it's much more informative than "<random widget the user doesn't know or care about> failed to initialize". Paul