lua-users home
lua-l archive

Try/catch etc: Exceptions comments from Prof. William Kahan, 1997

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


G'day,
[I suspect I've posted a message like this before, a few years
ago, but I hope that it helps people navigate the current
debate.]
In the November 1997 issue of Dr. Dobb's Journal, there was an
extended interview with Prof. William Kahan, one of the principal
architects of the IEEE 754 Standard for binary floating-point
arithmetic. The conversation was with Jack Woehr. You can find
the article at:
http://www.drdobbs.com/architecture-and-design/a-conversation-with-william-kahan/184410314
In the first part of the interview, Kahan mentions that one of
his current areas of research is exception handling. To quote
the article:
 WK: One of my areas of research is exception handling. My
 thesis is that exceptions are not errors unless they are
 handled badly. Exceptions are opportunities for extra
 computation.
 [...] An exception is an event for which any policy you
 choose in advance will subsequently be found to be
 disadvantageous for somebody who will then, with good reason,
 take exception to the policy. [...]
He goes on to talk about compiler operation from some compiler(s)
from that time (sometimes optimising away apparently-unnecessary
code, only to find that extra-precision temporary register that's
mangled in the process disrupts the intention of the programmer),
and also about support libraries.
Kahan's other writings on exceptions are very good too -- look
at the first launch of Ariane 5, where an unprotected float-integer
exception (that was reused from the successful Ariane 4, but the
rockets had different early flight profiles) ended up destroying
the launch.
I hope that Kahan's take on the exception/error/hardware/compiler/
library/language ecosphere can be of some use in the current Lua
try/catch/finally debate.
cheers,
sur-behoffski (Brenton Hoff)
Programmer, Grouse Software

AltStyle によって変換されたページ (->オリジナル) /