I agree with this. For example, it leads to weird situations where a linter with a strict type checking configuration marks some code as a type error, but it runs just fine.
Which, in turn, leads to you ignoring type errors entirely, since you don't know which one are spurious and which ones aren't.
Re:Reasons to avoid static type checking
by jandrewrogers on Sunday January 28, 2024 @02:31AM
(#39163313)
Strong agree that half-assed type checking is the worst of both worlds. Most of the effort of real type checking but only a fraction of the real-world benefit.
Re:Reasons to avoid static type checking
by galaxyLogic on Sunday January 28, 2024 @02:15AM
(#39163246)
I think there is a big difference in what we type-check. The interfaces of public methods should be declared and type-checked. What happens inside a function not so much.
Therefore, I think "... the authors have no desire to ever make type hints mandatory, even by convention." is useless. I'm sure the authors are honest about their desires, but frankly either everything gets type checked or practically nothing does. It is unlikely that there is a social equilibrium where some things get checked and some do not. Not only that, but clever libraries that aren't written with type checking in mind are often a devil to hint retroactively.