4 ms·
You have things like IronPython or MicroPython, which are different from cPython but good enough. When I say transpiler, I don't mean just mapping one syntax t
by captainmuon 9y ago
You have things like IronPython or MicroPython, which are different from cPython but good enough.
When I say transpiler, I don't mean just mapping one syntax to another. I mean either really compiling to JS, or having a python bytecode interpreter in JS. It is possible to compile very different languages to JS, for example Nim.
I think it should be possible to support 100% of the core language - even metaclasses, why should that feature be more difficult? Of course you would not map Python classes to JS classes! You would map Python classes to something else, like opaque JS objects.
It is not realistic to support 100% of the library, but that is not neccessary - on the frontend, you wouldn't need to use most libraries, and you don't need C FFI. Most of the time, you'll be only pushing JSON or python objects into templates.