Destroying the notion of “fighting the compiler” was one of my biggest steps forward. I started to view the type checker as a pair programming buddy. One that doesn’t get tired, only states facts based on information it has, and will always update its assumptions based on new information, unlike most of us. ;)
So basically “type systems”, but only after a necessary perspective shift. Well, that and being exposed to what modern type systems can actually do. Instead of the limited assumption that they only catch errors like: “That’s not an Int!”.
It does! But it’s not a full replacement for a static/strong typing system, but it does help. We’re also pinned to an older version of Python (3.5) which doesn’t have full support for type hinting.
I’m a Java developer working with Python to automate some things. It seems like when the program is more than a few lines of code (1K) and needs to be maintained by a team, the desire for type systems grows strong.
I’ve been porting a large Python 2.x code-base to Python 3. Adding type annotations (https://mypy.readthedocs.io/en/stable/cheat_sheet.html) has been hugely helpful. The type system is quite expressive and mypy’s reporting is pretty good. After spending some time with Rust – which i really like – I appreciate the flexibility of Python’s approach.
Destroying the notion of “fighting the compiler” was one of my biggest steps forward. I started to view the type checker as a pair programming buddy. One that doesn’t get tired, only states facts based on information it has, and will always update its assumptions based on new information, unlike most of us. ;)
So basically “type systems”, but only after a necessary perspective shift. Well, that and being exposed to what modern type systems can actually do. Instead of the limited assumption that they only catch errors like: “That’s not an Int!”.
As someone building extremely complex, scientific systems in Python… this. Seriously, type systems are so undervalued.
Python 3.x doesn’t have type hints/annotations?
It does! But it’s not a full replacement for a static/strong typing system, but it does help. We’re also pinned to an older version of Python (3.5) which doesn’t have full support for type hinting.
I’m a Java developer working with Python to automate some things. It seems like when the program is more than a few lines of code (1K) and needs to be maintained by a team, the desire for type systems grows strong.
I’ve been porting a large Python 2.x code-base to Python 3. Adding type annotations (https://mypy.readthedocs.io/en/stable/cheat_sheet.html) has been hugely helpful. The type system is quite expressive and mypy’s reporting is pretty good. After spending some time with Rust – which i really like – I appreciate the flexibility of Python’s approach.