3 ms·
IMO the day python types become mandatory there will be a fork. It would be such a total betrayal of it's reason for existing that we would have to invent anot
by t43562 3y ago
IMO the day python types become mandatory there will be a fork.
It would be such a total betrayal of it's reason for existing that we would have to invent another untyped or duck-typed language again.
- sampo 3y agoI mean, your company or your project may require you to write type hints and use a type checker tool. Not that Python the language makes typing mandatory.
- chasd00 3y agonagware like Typescript have turned type bolt-ons into a religion almost. It has its place but really gets in the way in others. Hence, the reason untyped languages exist in the first place.
- kfajdsl 3y agoFor me the primary purpose of TypeScript is to give my editor information about interfaces so I don’t have to do the menial back and forth of accidentally making a typo in a function name, object param, etc. I find myself using less type hints in Python because the story for REPL driven development is so much better than JavaScript, and that takes most of the pain away.
- datavirtue 3y agoGiving the editors hints in this case is very expensive.
- mock-possum 3y agoIt is, but it’s worth it in some situations. It’s so much easier to sit down to an unfamiliar codebase, or to participate in a team of more than three or four serious contributors, when typescript is there to guide you. I never would have guessed that that would be the benefit that won me over, but it absolutely has, all it took was a two year / six people project to completely sell me on typescript.
- morningsam 3y agoI find that even when type hints are made "mandatory" using Mypy's strict mode, having a dynamically typed language underneath that allows you to cheat using Any or cast() where necessary makes writing Python feel much less cumbersome than writing in actual statically typed languages. Presumably, a Python with "mandatory" type hints would still allow you to cheat in those same ways.