Compiled IronPython

| by Jonathan Allen Follow 329 Followers on Aug 06, 2008. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

IronPython is Microsoft’s implementation of Python. It is being built simultaneously with the Dynamic Language Runtime, an infrastructure that allows dynamic languages to share code much in the same way the Common Language Runtime supports statically typed languages. Shri Borde discuses the status of IronPython 2 and how it works with compiled code.

Currently compiling IronPython to disk is temporarily unavailable. It was allowed in IronPython 1 and will return in the upcoming IronPython 2 Beta 4. This will be necessary if you want to reference the IronPython assembly from a statically typed language like C# or VB. It will also be needed when using reflection based tools like NUnit.

Another issue is that Python doesn’t have a way to support many CLS concepts. CLS, the Common Language Specification, is a subset of the full Common Type System and is considered to bare minimum needed for full interoperability. CLS compliant code excludes non-standard features such as VB’s optional parameters and C#’s unsigned integers.

IronPython has trouble producing CLS complaint code because there is no way to express concepts like visibility (Public vs. Private), parameter and return types, or custom attributes. Extensions to the language could be made, but at the cost of losing compatibility with other Python runtimes.

In the short term, hosting the DLR and thus IronPython, from an application written in VB or C# looks promising. As does building the base classes in those languages and extending them with IronPython code. Over the long run, possible enhancements such as the ability to make late-bound calls in C# without explicit reflection logic should prove beneficial.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Cool by pejvan beigui

I can't wait to see IronPython 2.0 released :-D

Fantastic by Chen Sunny

Fantastic post.
It makes us more clear about DLR and CLR.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you