Hacker News new | ask | show | jobs
by jestar_jokin 3914 days ago
Jython is quite outdated and has stagnated for a long time; support for Python 2.7 was only finalised in May this year. Forget about support for v3.5.

Perhaps by compiling from the bytecode of the existing interpreter, instead writing a whole new source code interpreter for the JVM, it will have some benefits in supporting newer versions of the language. Or, maybe it will help to decouple development of the standard library and the interpreter, possibly letting more devs work on it. You can't really be sure what benefits/deficiencies a different approach will bring until you actually try it - see PyPy, a "silly" idea to implement Python in Python, which now yields faster runtime performance than CPython.

2 comments

This is exactly why I spent a few hours trying to work out if I could perform some advanced trickery to plumb the pypy tool chain into something that would end up producing a pypy.jar or other JVM equivalent. Turns out it's not that easy. C to JVM isn't a well trodden path.

Jython is awesome and all but its fighting an uphill war against rapid progress in 3 with far too few resources.

> C to JVM isn't a well trodden path.

But it does exist.

https://wiki.openjdk.java.net/display/Graal/Publications+and...

Check "Truffle C: Dynamic Execution of C on the Java Virtual Machine."

That is the usual "what's easier - starting from scratch or updating existing codebase to newer python". Obviously starting from scratch is more fun, but finishing it to support full python will be a major task that will probably not happen.

PS. Jython also would be called transpiler in modern lingo