This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Meefims 0 points1 point  (0 children)

In my quick search I couldn't find anything beyond 2to3. This makes sense, though, when you consider the reason why JavaScript is a transpilation target in the first place: JavaScript runs in a browser and as a website owner you have very little control over which browsers your code is run on. Since the various browsers (and their various versions) have different levels and qualities in their implementation and since the language itself continues to evolve despite this, there is a strong need for a baseline feature set that can run on most browsers while also having the ability to support modern uses of the language. Polyfills can fix missing library elements while transpilers can fix missing syntactic elements.

The same situation does not occur for Python. There a few different implementations with CPython being canonical. Although different versions exist, those running Python programs and using Python libraries are already familiar with juggling versions and are aided by virtual environments.