3 ms·
I feel obligated to mention that large projects occurred in Python before types (and were not spaghetti). But I cut my teeth in the 2.4 era with google docstrin
by dmwilcox 3y ago
I feel obligated to mention that large projects occurred in Python before types (and were not spaghetti). But I cut my teeth in the 2.4 era with google docstrings which obligated the author to put the types in the docstring.
Sorry for another hot take. I definitely have sympathies toward the author's position, we are giving up flexibility which is Python's main strength for what exactly? (Might as well write Go/etc if you want static types)
- the good: as a reader I love not having to go to call site after call site figuring out _what type_ of thing was passed in and how that happened (google docstring projects don't have this problem but open source often does)
- the bad: as a writer the types are complicated and obtuse, and the more fancy first order stuff you do the uglier the types get (and just forget type annotating your unit tests). Also mypy is slow
- the ugly: the sadness of putting in all of the typing and it _not_ but used to improve runtime performance. Commonlisp gets something like a 30x speed improvement for type annotations because native code can be used in place of lisp objects, why can't we have _that_? I would feel much better about Python types if we did that