3 ms·
>My editor now has a fairly deep understanding of my code, and can tell me of all sorts of surprising errors I'm making before I run the code. I agree this is
by totony 4y ago
>My editor now has a fairly deep understanding of my code, and can tell me of all sorts of surprising errors I'm making before I run the code.
I agree this is useful, but to me the most useful feature of types are the self-documentation. It's crazy the difference between a non-typed library with shitty documentation vs a typed library with shitty documentation.
- kadoban 4y agoThe types on stitty-documented code often do depend on the types actually being checked though. Otherwise you need to author to be diligent in their types, but if they're bad in their other docs, that seems unlikely.
- kixiQu 4y agoSome people are willing to be meticulous about references even when they're Less Good Than One Might Wish at picking names or explaining things.
- tjoff 4y agoYou don't think that "the author thought that this function would return X, but I got Y" is useful?
- kadoban 4y agoOnly for archeological, and maybe sometimes psychological investigations of code.
- tjoff 4y agoThat line of reasoning doesn't make any sense to me. If the author / last person who touched the code misunderstood it then there is a 100% chance there is a bug here. Knowing that off the bat is quite helpful. And it also tells something about the code quality if it is a common occurrence.
- smitty1e 4y agoCould be an indicator to look up the file in git log. Which need would send me back to pypi to look at other prior art, if possible.
- pvillano 4y agotype hints are documentation, and machine readable documentation to boot!