Hacker News new | ask | show | jobs
by Intralexical 830 days ago
> It looks like one of the ways they do this is by letting you define functions that only use typed variables which is something I would like to see make its way back to CPython someday (that is optionally enforcing typing in modules and getting some performance gains out of it).

This is already how Cython and MYPYC work. You add standard PEP-484 type annotations, and they use that to infer where code can be compiled to native instructions.

https://cython.readthedocs.io/en/latest/src/tutorial/pure.ht...