There's basically two schools of thought for handling
programmer/runtime errors in libraries.

The "Have it your own way!" elitists claim that libraries
should _NEVER_ exit and _ALWAYS_ return an error code.

The other approach is "Punish the moron. NOW!" LART 'em w a ruler and
add assert's throughout the code on "can't happen" conditions.

For development of POPT 2.0 I prefer being punished, and
so am going to wire up assert's throughout POPT to
simplify the code.

For "release" of POPT 2.0, I'm perfectly happy to change
to the ... _NEVER_ ... _ALWAYS_ approach if that really matters.

Hint: When was the last time you saw any application undertake
a sane/reasonable corrective action and continue running when
malloc happened to return NULL? I've never seen such an application
(but my experience is limited).

Meanwhile, assert's for POPT 2.0 development are about to be checked in
so that I can see what needs to be done.

73 de Jeff
______________________________________________________________________
POPT Library                                           http://rpm5.org
Developer Communication List                       popt-devel@rpm5.org

Reply via email to