On 10/ 2/10 05:18 AM, Pascal J. Bourguignon wrote:
Seebs<usenet-nos...@seebs.net>  writes:

On 2010-10-01, Pascal J. Bourguignon<p...@informatimago.com>  wrote:
                                 static              dynamic

compiler detects wrong type     fail at compile     fails at run-time
                                                     (with exception
                                                     explaining this is
                                                     the wrong type)

Unless, of course, the "wrong type" happens to be compatible enough to
pass.  In which case, it's unclear whether it is the "wrong type" or not.

compiler passes wrong type      wrong result        fails at run-time
                                 (the programmer     (with exception
                                 spends hours        explaining this is
                                 finding the         the wrong type)
                                 problem)

I have no clue what exact scenario you're talking about here.  I've never
seen a bug that could plausibly be described as "compiler passes wrong
type" which wasn't picked up quickly by running with more warnings enabled.

This is the scenario discussed in this thread, a long is passed to
maximum without a compiler warning.

Which will cause the test for the bit of code doing the call to fail. So it fails at run-time with a failed test, just as it would in a dynamic language.

--
Ian Collins
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to