Reputation: 104
There have been many questions and answers about the relative benefits of static and dynamic typing. Each has their camp, and there are obviously good reasons for both. I'm wondering though, are there any specific features of Python that wouldn't be possible to implement or use in a statically-typed language?
I would expect that some of the more functional parts would be challenging, but we obviously have Haskell and C++14 and onward.
Again, specific examples would be appreciated!
Upvotes: 0
Views: 81
Reputation: 52
It is not possible to implement a list of heterogeneous types if you don't know all types you'll need at compile time.
Example: you load with input()
a user script that defines a new value of a new type defined there.
Then you want to insert that value in a list in your program.
I guess a lot of thing that come from interactions with input()
are impossible to implement.
Upvotes: 1