“Python is not Java”

Saw an excellent blog, by Phillip Eby, almost a year ago, and a friend of happened happened to recall it recently in a discussion about Python. It’s titled Python is not Java and talks about how adopting a Java approach when programming in Python just makes life difficult. In particular, I love the section about overuse of XML:

If you are a Java programmer, do not trust your instincts regarding whether you should use XML as part of your core application in Python. If you’re not implementing an existing XML standard for interoperability reasons, creating some kind of import/export format, or creating some kind of XML editor or processing tool, then Just Don’t Do It. At all. Ever. Not even just this once. Don’t even think about it. Drop that schema and put your hands in the air, now! If your application or platform will be used by Python developers, they will only thank you for not adding the burden of using XML to their workload. [Phil’s emphasis]

Now, it takes a brave man to be critical of any programming language. After overwhelming response from readers, he followed up with Java is not Python Either. It’s nice that he balanced the argument somewhat. His argument is in fact somewhat lacking, and it basically boils down to Java is good because it has generated a lot of good frameworks that are then ported to other platforms. He confesses to taking scraps from the Java table on many-a-occasion in order to avoid reinventing the wheel within a Python project.

I personally am a fan of both languages. The trick is to simply pick the strengths of a given language to match the needs of a given project.

Leave a Reply

You must be logged in to post a comment.