4 ms·
What's the difference between julia's types and mypy other than julia lacking a static checker?
by j88439h84 7y ago
What's the difference between julia's types and mypy other than julia lacking a static checker?
- johnmyleswhite 7y agoMypy types don't usually have any runtime enforcement.
- dnautics 7y agoJulia uses types as compiler hints. If you dispatch f(x) as f(1.0), in most cases it will lazily compile f to be float-optimized. When you run f(1) it will recompile it to be integer optimized. This enables you to also select libraries: a standard float type will use blas for matrix ops; a gpu float type will use cuda.