Re: "Strong typing vs. strong testing"



On 10/1/2010 2:28 AM, TheFlyingDutchman wrote:

in C I can have a function maximum(int a, int b) that will always
work. Never blow up, and never give an invalid answer. If someone
tries to call it incorrectly it is a compile error.

I would agree that the third sentence is arguably wrong, simply
because there's no such thing (outside #error) of a mandate to stop
compiling. However, my understanding was that the dispute was over
the second sentence, and that's certainly correct.

Why do you consider the term "compile error" a "mandate to stop
compiling"? What do you say to refer to the situation when you have a
statement in your program that the compiler finds is an error? And is
it really material whether the compiler flagged an error and stopped,
or flagged an error and looked for additional errors???

For the purpose of the argument, I do not think it matters whether the compiler looks for additional errors before it stops compiling. More to to point is whether or not it eventually produces an object file that can be linked into an executable file. 'Compile error' (as opposed to 'compile warning') should mean that it does not.

--
Terry Jan Reedy

.