ANN: JavaScrypthon 0.5, now with embedded evaluation of transpiled code

Amirouche Boubekki amirouche.boubekki at gmail.com
Mon Nov 28 14:02:22 EST 2016


On Sat, Nov 26, 2016 at 7:21 PM Alberto Berti <
azazel+python-announce at arstecnica.it> wrote:

> Hi all,
>

Héllo!


> i'm pleased to announce that JavaScripthon 0.5 has been released to
> PyPI. JavaScrypthon can translate a subset of Python 3.5 code to  ES6
> JavaScript producing beautiful and lean  code, while supporting some of
> the latest Python features.
>
> Changelog
> (https://github.com/azazel75/metapensiero.pj/blob/master/CHANGES.rst)


This is the best of ES6 in a Python syntax.

Impressive work.

I have a few questions:

a) Why do you choose not to use your own Javascripton class to represent
Python dict?

b) Do you do some type tracing or something to be able to convert
``foo.update(bar)`` to ``Object.assign(foo, bar)``

c) IIUC you don't implement Python type system and rely on ES6 (or ES7)
class system? Is that correct? If that's the case how do you implement
class decorators and method decorators?

d) What about Python <-> Javascript interop. It's a tremendous topic not to
be forgotten.

A few remarks:

i) I had a remark about arguments but javascripthon doesn't support
**kwargs at call site. This is implemented in Pythonium, have a look, it
has some js <-> python interop.

ii) Too bad I can't run the vanilla pystone benchmark

I created a similar project targeting ES5 [0].

Also, FWIW users are looking for a Javascript replacement that is real
Python, not another coffeescript.

Best wishes!

[0] https://github.com/amirouche/pythonium/blob/master/dodge.py



More information about the Python-list mailing list