4 ms·
It seems the problem stems from a poorly defined purpose of the API, which is to say, from this being a shitty example. Why would someone use slow_add instead
by pwdisswordfishc 4y ago
It seems the problem stems from a poorly defined purpose of the API, which is to say, from this being a shitty example. Why would someone use slow_add instead of the plus operator anyway?
- avidphantasm 4y agoYeah, 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.