Hacker News new | ask | show | jobs
by tlrobinson 3739 days ago
Python and modern JavaScript seem like fairly similar languages (dynamically typed, object oriented/functional hybrid, rich ecosystem of packages), the biggest difference being Python's "batteries included" standard library, which presumably isn't (all?) available in the browser.

So is the main reason to use this just familiarity with Python, minimal context switching if your backend is in Python, and the potential for a bit of code reuse between front/backend?

1 comments

The main reason is... context switching, also i'm a big fan of python's standard library, but I have yet to do any complete work just with it.
Is this supposed to be able to work for really large apps at some point? Some commenter lamented how it didn't work with django.
It cannot be used to convert python frameworks to javascript, nor Django nor any other
That seems to suggest that this isn't a fully-formed py->js transpiler?
It's in development, as many others software projects are, and is far from complete. The goal is to translate as much of core semantics as possible, but i doubt that all the core semantics will be translated. One for all is multi inheritance which is currently unsupported by current Javascript syntax. Even more, when you use an object such a list, it's really a JS Array that will be manipulated in the end, so you will have to use array.push() to add instead of python's list.append()

But Translating something like Django is out of scope for all the transpilers, it would mean also converting sql drivers and so on? Does this really make any sense? Maybe you have a look at emscripten https://github.com/kripken/emscripten/wiki

http://www.transcrypt.org/

Does multiple inheritance