Will GPL Java eat into Python marketshare?

Maurice LING mauriceling at acm.org
Thu Nov 16 17:27:52 EST 2006


Paul Boddie wrote:

> Maurice LING wrote:
> 
>>Say given cytoscape.jar, I'll like to be able to do this:
>>
>> >>> from cytoscape javaimport cytoscape
>> >>> c = cytoscape()
>>
>>And the tighest way I see that this can be done is for Python VM to
>>execute Java bytecodes like Python bytecodes. That is, Python VM
>>executes Java bytecodes directly and not through object mapping which I
>>think is that JPyPe is doing.
> 
> 
> This kind of thing is what I wanted to do with my javaclass experiment,
> but I lost motivation/momentum after getting only some of the things to
> work. Translating Java bytecodes isn't hard for most of the instruction
> set, although exception handling was awkward at the time (before Python
> 2.5's new-style Exception class), and I'd have to think through the
> interpackage referencing problem again (circular references are not
> typically a problem in the Java package hierarchy). In the end, I
> couldn't justify spending the time in order to use certain pieces of
> software that weren't so compelling after all.
> 
>

I take a simplistic view that Java bytecodes is all that is to be dealt 
with. And the book "Programming for the Java Virtual Machine" by Joshua 
Engel did demonstrated in principle that it is possible to program in 
Java bytecodes. There are also other researchware which tried to compile 
other languages into Java bytecodes. I am not sure if exception handling 
etc are dealt with before bytecode level. I also envision that the core 
implementation of JVM is a big switch statement, just like in Python VM 
(the bytecode executor).

Will it then be the case of adding the set of Java bytecodes into Python 
bytecodes and implementing Java bytecode operations? Or am I just 
fooling myself here?

ML



More information about the Python-list mailing list