Hacker News new | ask | show | jobs
by orwin 1704 days ago
The biggest reason why i like type hints is because it force me to reflect on the datatype i want to use before implementing my code.

Last week, i could've done either a dataframe, a list of list, a list of tuple, a dict of tuples, a dict of lists (this was a bad idea that did not survive more than 2s in my head) or a list of dict. I started coding with a dataframe in mind (i guess i wanted to show off my numpy/pandas skills to my devops colleagues), but adding type hints to my prototypes shut down the idea pretty quick: lot of complexity for nothing.