3 ms·
I highly doubt it for one core feature: performance. For a little while it looked like Python 4 might fix this (by using type hints to JIT) , but it was quickly
by m_mueller 5y ago
I highly doubt it for one core feature: performance. For a little while it looked like Python 4 might fix this (by using type hints to JIT) , but it was quickly given up. IMO a big shame as it is the one thing holding python back.
- oscardssmith 5y agoI think Julia actually does a pretty good job of showing that the problem isn't types. The problem is semantics. Julia's restriction is eval to the global scope is a perfect example of this. It has a pretty minor on code, but a massive effect on performance. Python has a ton of things like this where a slightly different (and totally breaking) semantic change prevents optimization.
- m_mueller 5y agoMy poinr wasn’t about type system per se but the ability to compile code down to natively execute without going through an interpreter. Whether you solve that through type inference or type hints I honestly don’t care, but afaik Julia has an easier job by allowing you to make types explicit on the data structure side while being flexible for the algorithms. Semantics are certainly also a big part, but it would be nice to have first party support for what Numba does, JITing a reduced set of semantics but keep everything else compatible.