Hacker News new | ask | show | jobs
by lokimedes 1753 days ago
That modern Python example scream regression to me. Why not simply cars = []?

This obsession with killing perfectly good languages with strongly typed hints is completely undermining the point.

3 comments

I think you're in the minority thinking that Python is "killed" by adding static (not strong, Python is already strongly typed) type hints. They are also optional, so you're free to not use them.

To go back to the code example, if you want to express the same thing in Python as in Java, you have to add a type hint to be able to statically check the code. A good thing about Python is that you can choose when and if you want to use a static type hint, while in Java you're forced to use them.

I have work with large python project without types. It's a nightmare. Types are extremelly useful.
Static type information makes it far easier to avoid a whole class of bugs, which becomes more important as your project gets larger.