4 ms·
Swift doesn't do a good job of interleaving with Python (i.e. allowing Python to call into Swift, while possible, is nothing like Numba due to various object ty
by liuliu 3y ago
Swift doesn't do a good job of interleaving with Python (i.e. allowing Python to call into Swift, while possible, is nothing like Numba due to various object type translation required).
Mojo seems to be targeting Mojo -> Python -> Mojo too (i.e. Mojo can do high level control flow, delegate some more control flow / unsupported ops to Python, then implement some accelerator supports that Python will call back to). This can be quite difficult if you want to have very low bridging cost (Python objects are quite large and different libraries, such as Python / numpy have different representations in C on top of these Python objects).
It is all possible (after all, we are doing computer stuff), but it is a quite difficult path comparing to other success interop stories (Swift / ObjC took a decade to achieve somewhat low bridging cost, Kotlin / Java simply gives up and doing everything in JVM).