« What would a Jython JSR do? | Main | Don Box: WS-CoatHangers »

IronPython: Jim Hugunin's paper from PyCon

I wanted to pinpoint the fatal flaw in the design of the CLR that made it so bad at implementing dynamic languages. My plan was to write a short pithy article called, "Why .NET is a terrible platform for dynamic languages". Unfortunately, as I carried out my experiments I found the CLR to be a surprisingly good target for dynamic languages, or at least for the highly dynamic specific case of Python. This was unfortunate because it meant that instead of writing a short pithy paper I had to build a full Python implementation for this new platform to see if there would be any hidden traps along the way. - Jim Hugunin

[via Miguel]


March 28, 2004 06:09 PM

Comments

Carlos Perez
(March 28, 2004 07:41 PM #)

He also concludes "However, implementing a dynamic language for the CLR is not a simple process. The CLR is primarily designed to support statically typed OO and procedural languages. Allowing a dynamic language to run well on this platform requires careful performance tuning and judicious use of the underlying CLR constructs".

So even after several attempts and several years, I'm still waiting. Theory is nice, some benchmarks are nice, but the proof is in the pudding.

Carlos Perez
(March 28, 2004 08:01 PM #)

Seriously though, the two main obstacles are to performance are

(1) CLR needs to be compiled prior to every execution, Jim touches on this with his eval("2+2") benchmarks however reasons it away by saying the user will not even notice it. But isn't this the heart of dynamic languages?

(2) The CLR has trouble discarding MSIL code, which Jim did not cover, however this is essentially to any robust implementation. That's why the CLR crashes with compiled Regex evaluation.

Sure you can always "squeeze blood out of a stone' but until MSFT makes some improvements, it's all going to just be nothing but a theoretical discussion.

Carlos

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/1204