[SciPy-user] python (against java) advocacy for scientific projects
Mon Jan 19 14:41:46 CST 2009
On Mon, Jan 19, 2009 at 14:33, Marko Loparic <email@example.com> wrote:
> Thanks Sturla and all the others for this very interesting discussion!
>> There is nothing that says a program written in
>> Python must be 'pure Python'. If you migrate that offending 5% to
>> Fortran or C, you would beat Java in terms of speed, and still retain
>> all the advantages of Python. That is why we don't have performance
>> problems when using Python for HPC. We don't use Python all the time; we
>> use Python where it is convenient.
> Specifically on this point, playing the devil's advocate, one could
> argue that using java we could also migrate the offending routine to
> C. Is there an element to argue that the Python/C mix is simpler or
> more powerful than the same for java/C?
> I saw also somewhere the argument that python tools containing C/C++
> routines like numpy and wxpython are more naturally or easily made for
> python than for java. Is that really true?
The JNI is notoriously difficult. The Python C API is relatively
straightforward, and there are tools (SWIG, Cython, f2py) that make it
even easier. Or you can avoid it entirely with ctypes.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-user