Python from Wise Guy's Viewpoint

Mike Silva snarflemike at yahoo.com
Fri Oct 24 17:06:39 EDT 2003


"Marshall Spight" <mspight at dnai.com> wrote in message news:<Olxlb.329829$mp.272035 at rwcrnsc51.ops.asp.att.net>...
> "Scott McIntire" <mcintire_charlestown at comcast.net> wrote in message news:MoEkb.821534$YN5.832338 at sccrnsc01...
> > It seems to me that the Agency would have fared better if they just used
> > Lisp - which has bignums - and relied more on regression suites and less on
> > the belief that static type checking systems would save the day.
> 
> I find that an odd conclusion. Given that the cost of bugs is so high
> (especially in the cited case) I don't see a good reason for discarding
> *anything* that leads to better correctness. Yes, bignums is a good
> idea: overflow bugs in this day and age are as bad as C-style buffer
> overruns. Why work with a language that allows them when there
> are languages that don't?

As I understand it, the Operand Error that caused the grief was a
hardware trap in the 68k FPU.  Seems that this trap would have been
programmed to do the same thing regardless of the language used.

Also, I wouldn't call this an overflow "bug."  The code was written to
assume (based on proofs) that any overflow indicated a hardware
failure, and to take the designed action for hardware failure.  It
would have been trivial for the programmers to prevent the overflow or
handle it in another way.  Instead, they made a deliberate decision
that the default exception handling was exactly the right response for
overflow on this variable.

Mike




More information about the Python-list mailing list