5 ms·
Good progress. I think you'd be mad to not use type hints, even for small scripts they're hugely advantageous. It's especially nice now that VSCode supports the
by IshKebab 6y ago
Good progress. I think you'd be mad to not use type hints, even for small scripts they're hugely advantageous. It's especially nice now that VSCode supports them well.
The only problems I have with them are that they are completely ignored by Python itself - you have to run a separate type checker. That's a fairly stone-aged system. And also I with VSCode had something like Typescript's "no implicit any" so it was more obvious where you had to put types that couldn't be inferred.
- incrudible 6y ago> The only problems I have with them are that they are completely ignored by Python itself - you have to run a separate type checker. What do you expect the Python interpreter to do, exactly? Type annotations are not supposed to affect execution. In my experience, you may want different type checkers with different configurations for different projects.
- IshKebab 6y agoI expect it to report type errors by default with an option to ignore them. Same as Typescript.