Stefan Behnel wrote:
> Magnus Lie Hetland wrote:
>> I'm not really suggesting this as project in the near future -- just
>> thought I'd hear if it would even be viable. That is, supplementing
>> the current C generating code in Cython with (e.g.) Java generating
>> code (with the Java code to be used in concert with Jython). This way
>> it would be possible to write high-performance code in the Cython
>> language/dialect and use it both with CPython and Jython (and, to some
>> extent, in C and Java).
> 
> Knowing the compiler internals, I don't think this would make much sense.
> Both the Cython compiler and the Cython language are closely tied to
> CPython and the C language. It should not be too hard to split the C
> generation phase from the rest, but most of what happens before that is
> already targeted towards C code generation and the CPython environment.
> Plus, you'd loose basically everything from the language that starts with
> a "cdef".


Well, using JNI I could imagine this could be made to work, but one has 
to assume this will be rather painful since the C API in Python is a lot 
closer to the metal than JNI in Java AFAIK. The again: Jython seems to 
be the most useful inside browsers and using non-standard extensions 
modules kind of defeats that use case. I do not know if Jython is faster 
than CPython, but why would you want to use it other than the embedding 
advantage? I am curious here since I never had more than superficial 
contact with Jython.

> If the PyPy project ever gets to release anything truely usable, that
> should be much better suited to targeting other environments.

*ever* :)

> That said, there is a project that tries to port CPython extension modules
> to IronPython, already with some success from what I heard. An adapted
> Cython backend might be very well suited to simplify the interfacing and
> porting overhead here. Haven't heard of anything in the Java area, though.

Do you have any pointers here?

> Stefan

Cheers,

Michael

> _____________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
> 

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to