Hacker News new | ask | show | jobs
by cgrubb 3399 days ago
I upgraded from 2 to 3 last year. I'm liking it.

I've embraced type hints. Although they have no run-time effect, there is a command line tool called mypy which enforces correctness. It has caught more than a few errors for me. Declaring the types of arguments and return values is a help when reading the code imo.

1 comments

This. Running a script which takes hours to execute, only to find you have a TypeError on the last line just before you get the results you need is really frustrating. Static typing is a must-have imo.
you will probably like Nim - https://nim-lang.org/ if you like Static Typing in a pythonish language, and writing long running (perhaps CPU intensive) tasks.
Agreed