Comment by dajonker
1 month ago
At least CPython and CRuby (MRI), the most common implementations of each language, ignore all type hints and they are not able to use them for anything during compile or runtime. So the performance argument is complete nonsense for at least these two languages.
Both Python and Ruby (the languages themselves) only specify the type hint syntax, but neither specifies anything about checking the actual types. That exercise is left for the implementations of third party type checkers.
Because the anti-types crew showed up and sabotaged it. Similar with perl and lua.
But languages with stronger and more intelligent leadership showed what's possible.
You cannot implement all the compiler optimizations for const and types in extensions. You need to fork it.
The problem is there are a lot of developers who have only coded with static typing and have no idea about the terrible drawbacks of static typing.
They don't understand what static typing does to code verbosity and development times.
Take Turborepo going from Go's typing light system (designed to emulate duck typing) to Rust's heavy typing system (true static typing). Originally the code was 20,000 lines and was coded by 1 developer in 3 months. When moved into the typing style you like so much, the same code is now 80,000 lines and was coded by a team of developers in 14 months.