Tuesday, November 14, 2006

IronPython and Jython

Right now, I don't do any kind of .NET development at all, but to be honest I got envious of IronPython after seeing this demo screencast. IronPython is the implementation of Python on top of .NET.

The somewhat sad story here is that Jim Hugunin, its author first created Jython on top of the JVM. It was pretty impressive back then, I remember writing applets in it many, many years ago. (1998 I think?)

Jim later created IronPython and got hired by Microsoft, where he currently works. Smart guy, it's a shame that we lost him to the dark side. :)

Anyway, back to the demo. The things I liked:

  • The integration with Visual Studio looks great. I loved the example where your Python code calls a C# function and the debugger can show the mixed stack trace for both languages.
  • The speed is impressive. Seems to be on par with CPython, depending on the scenario. Jython doesn't even come close.
  • A minor, but nifty thing is that he has tab completition for every class and function in the .NET framework.

While IronPython is under heavy development, Jython seems to be almost abandoned. A few days ago I needed to do some log analysis as part of our all-Java build system and I wanted to use Jython to implement it. It was a disappointment though. It was slooow and the last release was more than a year ago, so it is not up to speed with the latest Python features at all. Shame really. It could be a great Groovy contender.

But here's hoping that Sun's hiring two JRuby developers, IronPython's progress and the support for dynamic languages in Java 6 will somehow help revive interest in Jython.

Update: the JRuby developers working for Sun even offered their help to Jython. Nice.

1 comment:

Charles Oliver Nutter said...

Much of what was demoed in IronPython is absolutely possible with JRuby today, and perhaps Jython tomorrow. We need to get the Pythonistas fired up about helping to support a much more open Python implementation on a completely open VM, because that is the true path to enlightenment. We need folks like you helping to push Jython along...so stop by and offer your help whynot?