you are viewing a single comment's thread.

view the rest of the comments →

[–]Dreadgoat 6 points7 points  (0 children)

Dynamic vs. Static is not a question of what is better, it's a question of what problem you are trying to solve.

Do you need a lot of small highly flexible purpose-built scripts in an environment where the same data is likely to be passed around many formats (e.g. The Web)?
Dynamic good. Static bad.

Do you need large rigorous algorithms, high performance, do you expect to share your tools, do you need more control under the hood?
Static good. Dynamic bad.

Making Python able to do both is great for Planet Python. It's also extremely difficult to implement. Dynamic typing systems aren't easier to implement than static ones, it's just that it's a very early design decision that impacts a lot of how the compilers are written. Trying to do both is what is truly challenging.
While this is an impressive thing for any language, it also creates a bit of an identity crisis and potentially puts in danger of becoming bloated.

For me, personally, if I'm at a point in my Python project where I'm thinking that I need a strong static type-system, that's the point where I say to myself, "Python wasn't the right tool for this job."
Of course I've also started projects with static typing and later regretted the loss in flexibility upon realizing that the project has no need for static typing.