Java vs Python

Martijn Faassen m.faassen at vet.uu.nl
Sun May 28 17:40:47 EDT 2000


Robb Shecter <shecter at darmstadt.gmd.de> wrote:
[snip]
> I don't this does justice to the Java idea.  Java has the design goal
> of hiding -all- system dependencies.  And, features that are dependent
> on certain operating systems are clearly seperate from the standard
> Java packages.

Yes, this could also be called 'reinventing the wheel'. :)

> Python seems to go about half-way in this direction.  Some libraries
> seem to hide OS differences via an adapter sort of design, but there
> are many standard libraries that are purely only for certain types of
> systems.   Not that this is bad, it's just different.

Most commonly used standard libraries can be used on every system Python
runs on, though. The thin-layer design over C is a very good idea;
you get to exploit C and you don't have to reinvent the wheel. So lots of
pay-off for a *lot* smaller investment than what went into Java. 
This thin-layering over C is one of the lesser known great ideas in Python,
in fact (though of course this is also used in other scripting languages).

> I use Python for 90% of my new projects.  (I work only on Linux.)
> But, if I know that the software has to run on, say Linux and NT, then
> I'll use Java.  I've seen, first hand, successful cases of "porting" a
> Java program that was written on Linux to NT by just copying the class
> files.

Um, but I've seen the same happen over and over again in Python. Less so
if there's a GUI involved, of course, but take for instance the entire
Zope code base as an example; it works on Windows and on Linux and I don't
think there are big porting hassles  -- certainly not for Zope products;
I've personal experience writing those on Linux and getting them deployed
on NT.

As long as you stick to portable libraries (which is usually not hard to do),
Python code is about as portable as Java code, I'd say.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list