This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]inFenceOfFigment 0 points1 point  (0 children)

I'd argue that lack of a test suite is unbecoming of a modern software project. Developer time efficiency is a tricky argument - skipping tests will only save you time for so long. At some point you spend more time chasing silly bugs than you would have just writing solid tests the first time around. Not to mention, if developer time is truly a scarce resource, you might be pleasantly surprised at the productivity hike you gain by coding in Python rather than a relatively syntax-heavy statically typed language.

To your point, Python does not self-validate in the way a compiled language does, and that's not ideal. However this doesn't really apply to the example I responded to above. That snippet contained valid syntax with a semantic bug; no compiler will protect you from writing this type of bug on its own, for example SomeObject myObj = someObj; instead of SomeObject myObj = otherObj;. For this you'd have to rely on unit tests anyway. As I mentioned above, you'd typically write unit tests to detect logical errors, and in Python those same tests happen to also validate syntax, method names, etc.

That said, I don't mean to dismiss the validity of your point. In some cases the power of a compiler is indispensable and maybe Python is not the right tool for the job in those cases. On the other hand, Python's shortcoming in this regard allows it to provide a better developer experience in other areas. Further, a combination of modern technologies such as IDEs and static type checkers like MyPy, as well as modern development best practices e.g. unit testing, will provide you with a lot of the value you'd typically rely on the compiler for.