Kalle Anke <[EMAIL PROTECTED]> writes: > On Mon, 13 Jun 2005 20:41:48 +0200, Terry Hancock wrote > (in article <[EMAIL PROTECTED]>): > >> 1) Assume the variables are of a sensible type (not >> necessarily the one you expected, though), and provide >> exception handling to catch the case where their interface >> does not match what you expect. > > The problem I have with this is that I might discover an error at runtime > instead of compile time, this means that I need to really exercise all > possible test cases to make sure that I've covered everything (which of > course is a good thing) but it would be easier to discover this at "compile > time".
But static typing only catches *some* of the errors that might occur. Other errors will occur at run time even with static typing - so you need to really exercise all possible test cases to make sure you've covered everything in any case. > (note: I'm not trying to change Python, only that to me statically typing has > it advantages also) Static typing saves you some time by catching a small subset of programming errors at compile time. On the other hand, it costs you time by forcing you to declare a type for - well, everything that you're going to catch errors for. It's not clear which cost is larger. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list