Mark Damon Hughes On Java and Python [Parental Advisory: Explicit Lyrics] [about]
On Java and Python
Fri, 2005Aug26 12:38:54 PDT
in Software by kamikaze

I routinely see casual Python users who "hate Java". And yet you almost never see a Java programmer who dislikes Python (some might prefer another scripting language, but they don't hate). There's a reason for this: the casual programmers have never written a large program, and therefore haven't run into Python's limitations, which are the areas where Java shines. Each has its proper place.


Java is best suited to building large programs and frameworks which can be customized in some other language (usually XML documents). On any project over a few thousand lines of code, you absolutely want the compiler to do type-checking, verify method and field names, and you need a good IDE (like Eclipse). For cross-platform GUIs and graphics, there is nothing else that has even decent performance.

Python is best suited to writing small- to medium-sized programs, often doing something slightly OS-specific. Tkinter is an abysmally slow GUI, and all of the other GUI/graphics libraries are difficult to install and use cross-platform (yes, I've already tried your favorite library, no matter what it is). I have written a 10,000-line Python program, Umbra, so if anyone knows this from hard experience, it's me. Until you've done that, you have no idea what it's like.

Java does things that Python simply cannot comfortably do: Writing a large videogame in pure Python (as opposed to Python-scripting something written in another language) is insane, and I wish I had never tried it. Any large app is going to have the same problems. Python does things that Java simply cannot comfortably do: Writing a Java version of Randpod would be stupid--Randpod took me a couple hours to write and test, a Java version would have taken a couple days. But if I was going to write a new iTunes, the Python version would be impossible, while the Java version would take a few weeks. Chandler has proven this point--it's a mess, and has taken three years to reach the point where it runs at all (and still doesn't do much), while a Java equivalent would be an easy month or two project. They simply made the wrong choice.

There's a reason why Guido van Rossum keeps adapting Java APIs and concepts into Python--because it's useful to have semantically equivalent concepts in both languages.

← Previous: Back from GenCon (Roleplaying) Next: The Curse of Knowing Too Much (Software) →
Feedback  | Key: ] =local file, * =off-site link  | Copyright © 2003-2010 by Mark Damon Hughes | Subscribe with RSS 2.0