These are discouraging stats to Perlistas & Pythonistas...

Stuart D. Gathman stuart at bmsi.com
Tue Jan 7 22:51:57 EST 2003


On Tue, 07 Jan 2003 13:56:18 -0500, Warren Postma wrote:


> These stats confirm what we already knew, which is that there are more
> VB idiots and Cobol old-timers out there than you can possibly count.
> And Java? It's the new cobol.

Why so anti-Java?  There is Java the language and Java the virtual
machine.  Java the language is slightly higher level than C - more
productive than C/C++, but not nearly as productive as Python.  However,
Python runs great on Java the virtual machine.

Why use the virtual machine?  It provides an airtight software sandbox -
as good as hardware sandboxing (e.g. unix users).  The weakness of both
lie in the gatekeeper software, e.g. buggy root daemons in unix or buggy
access checking in Java (like the applet bug that allowed read access to
file: urls - or any other protocol it didn't recognize).  I trust Java
application security a little more because there can be no buffer overflow
exploits, but I still use unix kernel security as a backup by running the
JVM as an appropriately privileged user.  I don't think the restricted
mode in the CPython VM is as watertight.

The JVM also lets the Java/Python code run on AIX, Linux/x86, Linux/PPC,
MacOS, Windows without any porting - and only a little debugging of
machine depencies that leak through.

The Java VM provides great performance for a virtual machine.  The JIT
versions are memory hogs, but I routinely run Java applications in as
little as 256K text + 256K heap in interpreter mode.  The core interpreter
is only 128K, and basic native extensions like networking are only 30K or
so.  Simple non-graphical Java applications require only 256K or less of
heap - similar to CPython.  JPython has a lot of Java code, but it needs
the JIT to perform like CPython - and JITs are already a memory hog,
nobody misses an extra meg or so.

In summary, Java the VM is good for security and binary portability - and
has decent performance with both memory efficient (interpreter) and CPU
efficient (JIT) implementations.  Java the language is good for C level
coding that doesn't have to worry about stomping on memory and has built
in object support.  Both have their place in the world along with the
wonderful high level Python language.  Why do you think Jython is so
popular?

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Python-list mailing list