program surgery vs. type safety

dman at dman at
Fri Nov 14 19:48:42 CET 2003

On 14 Nov 2003 04:17:08 -0800, Jeremy Fincher wrote:
> Alex Martelli <aleax at> wrote in message news:<QAOsb.21403$hV.779611 at>...
>> Sure,
>> "tests can only show the _presence_ of errors, not their
>> _absence_".  But so can static, compiler-enforced typing -- it
>> can show the presence of some errors, but never the absence of
>> others ("oops I meant a+b, not a-b"! and the like...).
> But it *does* show the absence of type errors,

Not all the time.  Casting (a la C, C++, Java) allows the programmer
to say "silly compiler, you don't know what you're saying" (usually,
it also converts int<->float and such, but apart from that).  That
results in a runtime type error the compiler didn't detect.  A Java
runtime will detect that later, but C and C++ will just behave wrong.


What good is it for a man to gain the whole world, yet forfeit his
soul?  Or what can a man give in exchange for his soul?
        Mark 8:36-37
www:            jabber: dman at

More information about the Python-list mailing list