2 ms·
I'm not terribly familiar with the options for typing, mostly because I'm salty that Python rolled out annotations without a clear plan for how they'd be useful
by klyrs 5y ago
I'm not terribly familiar with the options for typing, mostly because I'm salty that Python rolled out annotations without a clear plan for how they'd be useful*. Aside from Cython, does typing provide any mechanism to improve performance, or is it only there for static analysis? Worse yet, is it being used to do dynamic analysis that slows the whole thing even further?
* specifically, this happened long after the tragically many-ways-to-do-it of packaging systems and virtual environments, which survive to this day.
- mgraczyk 5y agoThere are some tools that use types for optimization, but I'd say it's still pretty early. For example, mypyc is a python to C compiler that is part of mypy. It uses types for both correctness and optimization: https://mypyc.readthedocs.io/en/latest/using_type_annotations.html https://mypyc.readthedocs.io/en/latest/using_type_annotation...