3 ms·
when types are not checked and enforced, they get out of date just like comments and docstrings. i agree with the author, if the hints can't be trusted, even j
by minusf 4y ago
when types are not checked and enforced, they get out of date just like comments and docstrings.
i agree with the author, if the hints can't be trusted, even just once, there's no point littering the code with them, and are actually harmful when trying to debug something using faulty hints.
i am a big fan of static typing but not in python. pick a language that was designed around it. you can't make a duck bark.
- icedchai 4y agoFor libraries, with many consumers of the code, type hinting seems like a good thing. Many times I download a third-party library and waste tons of time looking at sample code. For application code (internal to the service or whatever), it feels less valuable.