4 ms·
Yeah, it seemed like a straw man example. For me, type hints are most useful as a sort of meta domain specific language. Type hints can be hard to get right for
by avidphantasm 4y ago
Yeah, it seemed like a straw man example. For me, type hints are most useful as a sort of meta domain specific language. Type hints can be hard to get right for abstract data types, and it’s often not worth it (and I rarely write ADTs in Python, relying on what the rich standard library offers). I find type hints to be very useful for “annotating” domain-specific code that carries out my application’s “business” logic. This rarely includes things like basic arithmetic functions.