In article <[EMAIL PROTECTED]>, Hans Nowak <[EMAIL PROTECTED]> wrote: >Paul Rubin wrote: > >> You should write unit tests either way, but in Python you're relying >> on the tests to find stuff that the compiler finds for you with Java. > >As I wrote on my weblog a while ago, I suspect that this effect is >largely psychological. You jump through hoops, declaring types all over >the place, checking exceptions, working around the language's >limitations, etc. So when your code compiles, it *feels* safer. Like >you're at least part of the way towards ensuring correctness. All that >work must be good for *something*, right? Never mind that when writing >unit tests for a dynamic language, you don't check for these things at >all. How often do you explicitly check types in Python unit tests? >IMHO, when using a dynamic language, you don't need most of the checks >that Java, C# and their ilk force upon you. . . . Me, too.
That is, while I have a LOT of respect for Paul's programming and judgment, and question myself when I'm on the side opposite him, I ultimately value type declarations in languages such as Java as more cost than benefit. It's a funny position to hold, because I simultaneously recognize that type theory is one of computing's strongest theoretical achievements, AND I am a strong advocate of "static" syntax checkers such as PyChecker. Still, I see TDD as the right place to start. -- http://mail.python.org/mailman/listinfo/python-list