I started programming in Rust several years ago, and it has gradually changed the way I design programs in other programming languages, most notably in Python. Before I started using Rust, I was usually writing Python code in a very dynamic and type-loose way, without type hints, passing and returning dictionaries everywhere, and occasionally falling back to “stringly-typed” interfaces. However, after experiencing the strictness of the Rust type system, and noticing all the problems that it prevents “by construction”, I suddenly became quite anxious whenever I got back to Python and wasn’t provided with the same guarantees.
I fully agree with the post. Except for a fast prototyping or a short personal script where it could be not necessary, type hint is a must. The subject is not only to guarantee that the program now runs without errors, but it will be still working right in the future too, even after a developer (either the original or other) make changes to the code.
I do type hinting everywhere, cause I like it when my IDE auto complete works well ❤️