I would think that since they both run on the JVM, Scala and Jython could be used together. How well do they interface? Can you make calls to Scala libraries from Jython? What about Jython libraries from Scala?
Asked
Active
Viewed 2,333 times
1 Answers
13
Take a look at this report from Daniel Spiewak who, at the recent OSCON, discussed the interoperability issue with various JVM language creators. It won't answer any of your questions, but might give you a better understanding of the possible issues.
One thing, though, I can tell you for sure. Since Scala can be called from Java, then anything that can call Java can call Scala. As for Scala calling Jython, that depends on whether Java can call Jython -- if it can, then it is possible. Interoperability issues might exist, however.

Daniel C. Sobral
- 295,120
- 86
- 501
- 681
-
2Thanks; your answer pointed me in the right direction. I looked into it, and it is possible to call Jython from Java; the recommended way to do it is to use a factory that transforms the Python objects into good Java Objects. See [Jython.org](http://www.jython.org/faq2.html) and [Python.org](http://wiki.python.org/jython/JythonMonthly/Articles/October2006/3). – Keith Pinson Aug 12 '11 at 18:28
-
1However, Scala code can be awkward to call from Java - you need to understand how Scala is translated, and when complex Scala features are used that can get really ugly. – Blaisorblade Aug 12 '11 at 23:23
-
1@Blaisorblade In all JVM languages, the best interoperability results come from making available an API targeted at Java. – Daniel C. Sobral Aug 13 '11 at 04:48