"Strong typing vs. strong testing"
Keith Thompson
kst-u at mib.org
Fri Oct 1 15:01:59 EDT 2010
pjb at informatimago.com (Pascal J. Bourguignon) writes:
> Seebs <usenet-nospam at seebs.net> writes:
>> On 2010-10-01, Pascal J. Bourguignon <pjb at informatimago.com> wrote:
>>> Seebs <usenet-nospam at seebs.net> writes:
>>>> On 2010-10-01, Pascal J. Bourguignon <pjb at informatimago.com> wrote:
>>>>> 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.
>>
>> The compiler didn't pass the wrong type, the user did.
>
> And the compiler passed it on without saying anything.
Because the user didn't use the option (-Wconversion) that would have
caused the compiler to warn about it.
[...]
--
Keith Thompson (The_Other_Keith) kst-u at mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
More information about the Python-list
mailing list