Java guy interested in Python

Ken Seehof kens at sightreader.com
Sun Mar 4 01:54:16 EST 2001


The article http://www.python.org/~rmasse/papers/java-python96/, which you may have seen because it is linked to in a previous post, gives a good overview of the differences.  However you should be aware that it was written in 1996 and python has made several advances since then (I'm sure java has as well, but naturally I haven't kept up on java after I learned python).

In particular:

- Python support for web development has grown substantially (e.g. Zope (www.zope.org)).

- Jython http://www.jython.org/ has arrived.  This lets you run python on a Java Virtual Machine (JVM) and derive python classes from java classes.

- Look in http://www.vex.net/parnassus/ for lots of other stuff.

And if you go outside the scope of web programming, IMHO, you find that python seems to have much broader scope.

In terms of the languages themselves, I think the biggest difference is that Java has declarations and is statically typed, while Python is dynamically typed and doesn't have declarations (except the rarely used 'global' keyword).  Many programmers are confused in that they think the purpose of type declarations is to protect the programmer from errors by providing enforcement of "programming by contract".  IMHO, type declarations are a sacrifice necessary to give compilers enough information to produce efficient code.  Type declarations make sense in C and C++, but they are (IMHO) a design flaw in high level languages.

Of course, as has been mentioned many times, no single language is best at everything, so it's good to learn a few.  On the other hand I haven't encountered any problems lately that can't be solved efficiently in python, combined with extensions written in C++.

Oops, I seem to have gotten carried away and forgot I'm a gentle python programmer.  I hope the "IMHO"s prevent a flame war :-).

  ----- Original Message ----- 
  From: Kyle Wayne Kelly 
  To: python-list at python.org 
  Sent: Saturday, March 03, 2001 7:17 PM
  Subject: Java guy interested in Python


  Can anyone tell me some of the things that Python offers which are not available in Java?  I like Python's syntax, but what can Python do that Java can not do?  Any comments are helpful.

  Kyle Wayne Kelly
  Computer Science Student
  University of New Orleans
  http://www.cs.uno.edu/~kkelly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20010303/2cd8e3cd/attachment.html>


More information about the Python-list mailing list