On 10 Oct, 10:44, Lie Ryan <lie.1...@gmail.com> wrote: > On 10/02/10 20:04, NickKeighleywrote:
> >>> > > In a statically typed language, the of-the-wrong-type is something > >>> > > which > >>> > > can, by definition, be caught at compile time. > > >> > Any time something is true "by definition" that is an indication that > >> > it's not a particularly useful fact. > > > I'm not sure I agree. On occaision knowing something is true-by- > > definition is very useful! > > Something that is true by definition is just as useful as saying: "my > program is correct, by definition, because my requirement is what my > code is doing". well no it isn't. By definition a compiler catches (or is capable of catching) type mismatches. And some (all?) type mismatches are a useful diagnostic. You can dance around all you like but its true. I've worked in a test department and I really have received "but that's what the code says!" as an explanation for an observed misbehaviour. > It's a circular argument, your program requirement, for > which the program is supposed to be tested against, is the code itself; > so whatever undesirable behavior the program might have is parts of the > requirement, so the program is, by definition, bug free and it's user > expectation that's wrong. yes I know. It's a strawman because I never said that or anything resembling it. -- http://mail.python.org/mailman/listinfo/python-list