r/ProgrammerHumor • • Jul 20 '18

Every Time

Post image
52.2k Upvotes

749 comments sorted by

View all comments

Show parent comments

1

u/Flatscreens Jul 20 '18

Are type hints close enough?

1

u/mpa92643 Jul 20 '18

They help, but like their name, they're only hints. It's pretty easy for the object to be set as something else accidentally. It gives you an idea of what type to expect for a variable, but you have no guarantee that it will actually be that type at runtime.