3 ms·
I beg to differ, I've seen it adopted in quite a few places by large companies. I've rarely seen it used in startups though. My evidence is anecdotal (so is you
by inglor 7y ago
I beg to differ, I've seen it adopted in quite a few places by large companies. I've rarely seen it used in startups though. My evidence is anecdotal (so is yours though).
I definitely agree that it's not seeing nearly as much adoption as let's say... TypeScript in the JavaScript ecosystem though.
Facebook even wrote a package to generate types automatically for existing code https://github.com/Instagram/MonkeyType https://github.com/Instagram/MonkeyType .
- mixmastamyk 7y agoRe: startups, it's more useful in a large, mature code-base rather than smaller projects still in the design-churn phase.
- vtomole 7y agoFWIW, we use mypy in Cirq (https://github.com/quantumlib/Cirq https://github.com/quantumlib/Cirq) and we haven't reached version 1.0 yet.
- philwelch 7y agoIt’s important to introduce it early enough that it’s still feasible to introduce it. Otherwise the architecture of the code will get in the way—defining classes deep within module hierarchies for objects that get returned up is painful.
- philwelch 7y agoI’m speaking from the personal experience of using it myself. I don’t doubt that some companies have large internal Python codebases with extensive type annotations. If you’re at one of those companies, maybe the experience of using those annotations rises from third-rate to second-rate. It’s never going to be comparable to a statically typed language, or maybe even a language designed from the ground up with optional static typing in mind. And that’s fine! Python is probably the best language in its niche. Type annotations just don’t do enough to break out of that niche. Annotated Python with mypy is a terrible statically-typed language. Python generally is an excellent dynamically-typed language.