It probably even supports ArrayList….

I was chatting with a friend tonight about the fact that both of us are interested in learning Python, for slightly different reasons. He has noticed some job listings that indicate Python as being a particularly desirable skill, and theorizes that it would be pretty straightforward to pick up if you have a good understanding of Java. That theory is supported by the large number of books and articles written specifically to help the Java programmer learn Python. (See: Python for Java Programmers or Python for Java Programmers) In fact, if you have a background in Java, this Python & Java Side-by-Side Comparison does a nice job of not just laying out the differences, but in doing so describing what Python is. For me what is the most jarring is the lack of types. Which is weird, because I spent many years in grad school programming LISP, but I also spent a fair amount of time surrounded by proponents of strongly-typed languages. Between that and my current immersion in Java world, it makes me feel vaguely itchy to think about writing code without types. What if I try to add an int and a String? The world would end! Or at least it should!
For myself, my interest in Python comes from thinking about my upper level courses. With programming as a prerequisite, I can ask students to write Java programs, but Java can be unwieldy and I have wondered if I would be better off spending a couple of classes teaching Python and then have students write code in that. Or, even better, I could use Jython – an implementation of Python that runs via the JVM and lets programmers use the Java libraries in their Python code. I had never heard of this until my friend pointed it out, but it sounds perfect. Students can use the familiar and vast Java libraries, including nitpicky ones like Swing that take some practice, but avoid the complexity of writing a full-blown Java program. Assuming Jython works the way it sounds like it does – I guess I have a backburner project to work on now….

Leave a Reply

Your email address will not be published. Required fields are marked *