Hacker News new | ask | show | jobs
by throwaway2037 1069 days ago
About using type annotations in Python: Do you get any push back from your team? I do. "Oh, it clutters the code." I don't know how to reply. And, they continue to write complex code without type annotations. It is hard to reason about. It is a never ending battle with people who come from weaker typed language. They struggle to see the value of stricter types.
1 comments

Sure, a little bit. It is a change in peoples' workflows after all, and a lot of developers are pretty choosy about that. But I think you can overcome that if you make a respectful case.

I think you are spot on that people coming from weakly typed languages often don't realize what they're missing. "It clutters the code" is really just "I'm not used to seeing it that way" so if you can get people to try it out (maybe in a well-cordoned area of the code base or in some new dev) they will find out for themselves that it saves time and grief in the end.

Thanks for your reply. Unfortunately, your strategy has not worked for me. The mostly Python people are me continue view types as a burden, not a benefit.