From: <bc...@wo...> - 2001-03-08 22:27:48
|
[John Mudd] >Any thoughts about developing a tool to convert Jython to Java? Unlike >jythonc (which is a great tool!), something to ease the job of porting >to Java in order to get better performance. > >I'm porting code by hand now. It's pretty mechanical. Yes, but not entirely. >And the performance gain is dramatic. Yes. >If only it wasn't sooo tedious. Yes. Keep in mind that since you wrote the original python version, you are familiar with the exact type of all the variables in the application. Creating a tool that can figure out this information from a data flow analysis is not that easy. JimH though it was possible and his original jpythonc2 was intended to such a type analysis tool. However, it is not a tool I can create. >BTW, after spending hours adding braces and semicolons and "new" and >*obvious* data types, etc. to transform Jython to Java, I now think of >Java as simply Jython dressed in drag. (Not that there's anything >wrong with that!) Probably because you only use a small subset of python's dynamics. Think about converting an application that changes the __class__ field, add or replace methods on class, use multiple inheritance or build codestrings to be exec'ed. regards, finn |