Newsgroups: | comp.compilers |
From: | chased@rbbb.Eng.Sun.COM (David Chase) |
Organization: | Sun |
Date: | Wed, 13 Jan 1993 17:49:06 GMT |
Keywords: | types, debug |
References: | 93-01-041 93-01-078 |
jlg@cochiti.lanl.gov (J. Giles) writes:
>... The article I was responding to made claim that
>programs which pass the typechecker of a strictly typed language never
>have bugs (the exact statement was " An SML program which successfully
>typechecks will not bomb at runtime").
>This latter is clearly wrong. Not only *CAN* programs which are free of
>type errors still contain bugs, those remaining bugs are the hardest to
>find and correct: they account for the vast majority of debugging time.
I think you misinterpreted the meaning of the word "bomb". Clearly, what
is meant in this context is that a successfully type-checked SML program
will not destroy its abstract machine. Pointers will not accidentally be
overwritten with floating point numbers, the stack will not accidentally
be corrupted, and run-time data structures will remain sane.
What this means is that the you can debug your program at the "language
level" and not at the "compiled" (machine) level. In a large system,
pointer smashes are among the hardest bugs to fix, and avoiding them is a
good thing, even if other very hard bugs remain.
David Chase
Sun
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.