←back to thread

196 points bovem | 3 comments | | HN request time: 0.667s | source
Show context
jdeaton ◴[] No.41144130[source]
does it have a GIL
replies(2): >>41144305 #>>41145309 #
galdosdi ◴[] No.41144305[source]
idk but Jython didn't. So I don't think there's anything inherent in the language outside of CPython that calls for it.
replies(3): >>41144842 #>>41145702 #>>41146871 #
1. mwexler ◴[] No.41146871[source]
Hadn't thought about Jython for a while. Whatever happened to that?
replies(1): >>41147000 #
2. pansa2 ◴[] No.41147000[source]
One of the casualties of the Python 2 => Python 3 debacle, it seems.
replies(1): >>41147375 #
3. nostrademons ◴[] No.41147375[source]
It's special-purpose, and always has been. You use Jython when you want to embed a Python-like interpreter into a Java program. Usually when you do so, you're scripting the objects of the Java program, and don't need or want to import arbitrary Python packages. Indeed, that's often the whole point of Jython - the system designer wants a language that's familiar to Python programmers, while also being able to control the environment that those Python scripts can access.

This is not different from the Python 2 days. Jython has always had subtly different semantics from Python (eg. it uses Java strings instead of Python ones, there's no C API, it relies on the Java GC so no eager free), so many common libraries wouldn't work with it. Just try to run NumPy on Jython - you can't, despite the same developer authoring both Jython and NumPy's predecessor.