3 ms·
Ask HN: Will Web Assembly make Python truly viable for browser programming?
- T-A 9y agoI doubt it. WebAssembly is a compilation target [1]. Python is interpreted. Maybe you could compile the CPython interpreter to WebAssembly, along with every native library you need, and then run your Python code on your recompiled interpreter - so you would have Python being executed by an interpreter being executed by a JIT compiler running inside a browser. Execution would be even slower than on CPython, and I would expect download size to be impractically large. You'd be better off transpiling Python to JavaScript. [1] http://webassembly.org/docs/high-level-goals/ http://webassembly.org/docs/high-level-goals/
- GeneralMaximus 9y agoNot just this, but interfacing with browser APIs and the DOM from WebAssembly is also not very performant at the moment. I don't understand compilers and VMs enough know whether it's practical or even possible to expose the existing JavaScript GC in WebAssembly. Can somebody who works with browser internals shed some light on this?
- galfarragem 9y agoI doubt it but.. https://insights.stackoverflow.com/trends?tags=python%2Cjavascript https://insights.stackoverflow.com/trends?tags=python%2Cjava...