(no title)
guiand | 4 years ago
It’s an uphill battle to convert a team over to using hinting because of how awkward things can get and how easy it is to just pretend the feature doesn’t exist.
guiand | 4 years ago
It’s an uphill battle to convert a team over to using hinting because of how awkward things can get and how easy it is to just pretend the feature doesn’t exist.
wraptile|4 years ago
In general I've yet to see what these type check systems (be it mypy, pyright or any other) offer over proper tests. Type hints are there for developers not the machine.
ameminator|4 years ago
lmm|4 years ago
In a language with proper first-class typing, the advantage is that they're included in your automated refactoring rather than needing manual updates. But yeah I've never found optional type systems to be any use.
BerislavLopac|4 years ago
The only way for type hints not to be static types is to not run the checker before deploying.
Static typing means that the types of variables and their values are statically checked (hence the name) before the execution; in most statically typed languages that happens at compile time. There is no static check at runtime, and it's perfectly possible to send an incorrect type to a dynamically loaded library even in compiled languages (which usually, but not necessarily, results in crashing he program).
toomanydoubts|4 years ago
If you want to see where static typing really shines, try writing some Haskell. It's an absolute delight.
Spivak|4 years ago
The import pattern in the article is actually something I’ve never encountered because of how common the HAS_MODULE pattern is. I’ve never even thought to override the module binding.