Hacker News new | ask | show | jobs
by j88439h84 2368 days ago
Type hints and dataclasses are a game-changer for Python. Much easier to reason about programs that use them.
2 comments

> Type hints and dataclasses are a game-changer for Python. Much easier to reason about programs that use them.

Type hints made large python codebase switch from "Any change will blow up to my face" to "I can touch it carefully with protection gloves".

Through, it is still pretty easy to fool mypy and very far of the compile time guarantees that provide most static typed AOT compiled language.

And unfortunately, it also does not bring any advantage in term of performance.

> Type hints...

At that point it makes more sense to use a statically typed language.