3 ms·
> As someone who's worked on a huge Python program (10M+ LOC), type safety was the last thing on our mind when maintaining it. This is true. Python dictionarie
by harveywi 4y ago
> As someone who's worked on a huge Python program (10M+ LOC), type safety was the last thing on our mind when maintaining it.
This is true. Python dictionaries are extremely powerful, and they obviate the need to use elaborate types throughout the code. There is even a special syntax for making dictionaries in Python. In a code base with lots of dictionaries, type errors are a thing of the past.
- klyrs 4y agoEverything-a-dict results in KeyError instead of type errors. But of course, the values have a type unless it's dicts all the way down. And I really wonder what you'd be using those 10M LOC for, with that approach...