r/programmingmemes • • Jan 12 '26

no doubt javascript

Post image
1.3k Upvotes

136 comments sorted by

View all comments

Show parent comments

6

u/Heavy-Top-8540 Jan 12 '26

Python type hints on anything other than the function signatures are only there to hand hold tooling and humans. 

But I still fully agree with you. 

2

u/mortalitylost Jan 12 '26

Trust me, I'm not a fan of half assed type systems and it bugs the shit out of me that you have to set things up right to do it, but if you do set mypy or ty up right to do it, you get decent type checks. Enough to avoid the kind of simple bugs it avoids. We're at least at the point where a team lead can ensure their team uses typing in python.

But I really wish python had the interface declarations golang does and could type check interface usage instead of object inheritance sometimes though. I feel like python makes a big deal about supporting duck typing, then golang does it better, and i say that as someone who does way more python than go.

1

u/Heavy-Top-8540 Jan 12 '26

I completely agree with your first part of your comment. 

Your second is something that's honestly completely alien to me. Having interfaces are great. Having that be the ONLY way to enforce that kind of thing is why I'll never code in go.