<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tales from the Evil Empire : Dynamic languages</title><link>http://weblogs.asp.net/bleroy/archive/tags/Dynamic+languages/default.aspx</link><description>Tags: Dynamic languages</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Fun with C# 4.0’s dynamic</title><link>http://weblogs.asp.net/bleroy/archive/2009/09/17/fun-with-c-4-0-s-dynamic.aspx</link><pubDate>Thu, 17 Sep 2009 07:50:29 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7209018</guid><dc:creator>Bertrand Le Roy</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/bleroy/rsscomments.aspx?PostID=7209018</wfw:commentRss><comments>http://weblogs.asp.net/bleroy/archive/2009/09/17/fun-with-c-4-0-s-dynamic.aspx#comments</comments><description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="(c) Bertrand Le Roy 2003" border="0" alt="(c) Bertrand Le Roy 2003" align="right" src="http://weblogs.asp.net/blogs/bleroy/DSCN2236Touched_14096A29.jpg" width="244" height="184" /&gt;There’s been &lt;a href="http://haacked.com/archive/2009/08/26/method-missing-csharp-4.aspx"&gt;some&lt;/a&gt; &lt;a href="http://haacked.com/archive/2009/08/31/7-stages-of-language-keyword-grief.aspx"&gt;debate&lt;/a&gt; &lt;a href="http://blog.wekeroad.com/blog/magical-dynamic-mystery-tour/"&gt;recently&lt;/a&gt; on &lt;a href="http://msdn.microsoft.com/en-us/library/dd264736(VS.100).aspx"&gt;the new “dynamic” keyword in C# 4.0&lt;/a&gt;. As has been the case with many features before it, some love it, some hate it, some say it bloats the language, yadda yadda yadda. People said that about lambdas. Me, I’ll just use it where I see a use case, thank you very much.&lt;/p&gt;  &lt;p&gt;In the case of dynamic, another frequent comment is that a statically-typed language should not try to look like a dynamic language. Well, I just don’t believe in that distinction.&lt;/p&gt;  &lt;p&gt;Being dynamic is a &lt;em&gt;trait&lt;/em&gt; that a language can have, and some have it more than others. But as soon as a language has a dictionary type or indexers, and most modern languages do, it starts having dynamicity. What people call a dynamic language is just one where it’s the only available type.&lt;/p&gt;  &lt;p&gt;Now there is type safety of course, but to me that’s a different feature that is not as coupled with “statically-typed-ness” as we usually tend to think. Case in point, many modern JavaScript engines analyze the code in order to apply many of the optimization techniques that static languages have been applying at compile-time.&lt;/p&gt;  &lt;p&gt;So just how dynamic was C# before 4.0? Well, there are dictionaries and indexers, as I’ve said, but there are also other interesting and less known features such as &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.customtypedescriptor.aspx"&gt;custom type descriptors&lt;/a&gt;. Go &lt;a href="http://msdn.microsoft.com/en-us/library/ms171819.aspx"&gt;look them up&lt;/a&gt; if you don’t know about them. Type descriptors are for example used to provide a level of indirection between a design surface and the components being edited.&lt;/p&gt;  &lt;p&gt;But type descriptors can also be built completely dynamically and decide to expose a completely virtual object model that is entirely built at runtime. Of course, the client code for that object has to go through the right APIs to make use of that quasi-dynamic model. And of course those APIs are not simple. Implementing a custom type descriptor in itself is not exactly trivial.&lt;/p&gt;  &lt;p&gt;If anything, the dynamic keyword is going to provide a friendlier syntax for this sort of thing. One problem is that it has no relationship whatsoever with custom type descriptors.&lt;/p&gt;  &lt;p&gt;So I thought I’d try to bridge that gap. How can we take a type that exposes a custom type descriptor, such as &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.datarowview.aspx"&gt;DataRowView&lt;/a&gt;, and transform that into something that plays nice with the dynamic keyword? What we want to be able to write is something like the following:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;table = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;People&amp;quot;&lt;/span&gt;);
table.Columns.Add(&lt;span style="color: #a31515"&gt;&amp;quot;FirstName&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;));
table.Columns.Add(&lt;span style="color: #a31515"&gt;&amp;quot;LastName&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;));
table.Columns.Add(&lt;span style="color: #a31515"&gt;&amp;quot;Children&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue"&gt;int&lt;/span&gt;));
table.LoadDataRow(&lt;br /&gt;    &lt;span style="color: blue"&gt;new object&lt;/span&gt;[] {&lt;span style="color: #a31515"&gt;&amp;quot;Bertrand&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;Le Roy&amp;quot;&lt;/span&gt;, 2},&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;LoadOption&lt;/span&gt;.OverwriteChanges);
&lt;span style="color: blue"&gt;var &lt;/span&gt;tableView = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataView&lt;/span&gt;(table);&lt;br /&gt;
&lt;span style="color: blue"&gt;dynamic &lt;/span&gt;dynRecord = &lt;br /&gt;    &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TypeDescriptorDynamicWrapper&lt;/span&gt;(tableView[0]);&lt;span style="color: #2b91af"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;{0} {1} has {2} children.&amp;quot;&lt;/span&gt;, 
    dynRecord.FirstName, 
    dynRecord.LastName, 
    dynRecord.Children);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;To do that, I built the TypeDescriptorDynamicWrapper that you see being used above. What is does is pretty simple, as it just inherits from DynamicObject and implements TryGetMember as follows:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public override bool &lt;/span&gt;TryGetMember(&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;GetMemberBinder &lt;/span&gt;binder, &lt;span style="color: blue"&gt;out object &lt;/span&gt;result) {&lt;br /&gt;
    &lt;span style="color: blue"&gt;var &lt;/span&gt;name = binder.Name;
    &lt;span style="color: blue"&gt;var &lt;/span&gt;property = _properties.Find(
        p =&amp;gt; p.Name.Equals(name,
            binder.IgnoreCase ?
            &lt;span style="color: #2b91af"&gt;StringComparison&lt;/span&gt;.OrdinalIgnoreCase :
            &lt;span style="color: #2b91af"&gt;StringComparison&lt;/span&gt;.Ordinal));
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(property == &lt;span style="color: blue"&gt;null&lt;/span&gt;) {
        result = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
        &lt;span style="color: blue"&gt;return false&lt;/span&gt;;
    }
    result = property.GetValue(&lt;br /&gt;        _descriptor.GetPropertyOwner(&lt;span style="color: blue"&gt;null&lt;/span&gt;));
    &lt;span style="color: blue"&gt;return true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;As you can see, the method just finds the right property on the type descriptor and delegates to it if it finds it. I didn’t implement the setting of properties but it would be fairly easy to do so.&lt;/p&gt;

&lt;p&gt;Using that simple wrapper, the program above just works and displays:&lt;/p&gt;

&lt;p style="background-color: black; font-family: courier; color: white"&gt;Bertrand Le Roy has 2 children.&lt;/p&gt;

&lt;p&gt;That was easy. Now what about the reverse, getting any dynamic object to expose a custom type descriptor?&lt;/p&gt;

&lt;p&gt;Well, that’s where things get tricky.&lt;/p&gt;

&lt;p&gt;The dynamic capabilities of C# 4.0 are targeted at two things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Providing syntactic sugar for getting to dynamic members that looks like accessing statically-defined ones.&lt;/li&gt;

  &lt;li&gt;An easy way to create dynamic types by implementing a form of method_missing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But there is one thing that exists in &lt;a href="http://dlr.codeplex.com/"&gt;DLR&lt;/a&gt; but didn’t make it to C# yet, which is the ability to easily reflect on dynamic objects (other than by using the #1 syntactic sugar above).&lt;/p&gt;

&lt;p&gt;For example, in JavaScript, a.foo and a[“foo”] are exactly the same thing, which enables easy reflection: you can enumerate the members of an arbitrary object and do stuff like a[someStringVariable].&lt;/p&gt;

&lt;p&gt;Doing the same thing with C# on dynamic objects is much more difficult. The equivalent of a.foo is easy, but not the equivalent of a[someStringVariable].&lt;/p&gt;

&lt;p&gt;Forget about using reflection, it doesn’t work on dynamic objects because &lt;em&gt;dynamic really is a compiler trick&lt;/em&gt;. There is no such thing as a “dynamic” type to reflect on. It’s a keyword that tells the compiler to relax type-checking and generate code to access those dynamic members at runtime. If you try to reflect on an instance of one of the dynamic-friendly type, such as ExpandoObject, you’ll see the statically-defined members of that type, but not the dynamic ones. In a way, you’re looking at the messenger instead of the message.&lt;/p&gt;

&lt;p&gt;This is a problem because in order to wrap an arbitrary dynamic object into a custom type descriptor, we need to be able to reflect on the dynamic members of that object.&lt;/p&gt;

&lt;p&gt;To solve the problem, and with some help from the nice folks who are building the DLR, I compiled a simple program that sets and gets a property on a dynamic object, an then I looked at the generated code from Reflector (“luckily”, Reflector is not yet aware of dynamic and shows the generated code instead of something closer to the actual code you wrote).&lt;/p&gt;

&lt;p&gt;I was then able to refactor that code and replace the string constants for the accessed member with a method parameter, thus creating a generic way to access dynamic object properties:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static object &lt;/span&gt;GetValue(&lt;br /&gt;    &lt;span style="color: blue"&gt;object &lt;/span&gt;dyn, &lt;span style="color: blue"&gt;string &lt;/span&gt;propName) {&lt;br /&gt;
    &lt;span style="color: green"&gt;// Warning: this is rather expensive,&lt;br /&gt;    // and should be cached in a real app
    &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;GetterSite = &lt;br /&gt;        &lt;span style="color: #2b91af"&gt;CallSite&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;CallSite&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;&lt;br /&gt;        .Create(
          &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpGetMemberBinder&lt;/span&gt;(propName,
            dyn.GetType(),
            &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpArgumentInfo&lt;/span&gt;[] {
              &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpArgumentInfo&lt;/span&gt;(&lt;br /&gt;                  &lt;span style="color: #2b91af"&gt;CSharpArgumentInfoFlags&lt;/span&gt;.None, &lt;span style="color: blue"&gt;null&lt;/span&gt;)
            }));
    &lt;span style="color: blue"&gt;return &lt;/span&gt;GetterSite.Target(GetterSite, dyn);
}

&lt;span style="color: blue"&gt;public static void &lt;/span&gt;SetValue(&lt;br /&gt;    &lt;span style="color: blue"&gt;object &lt;/span&gt;dyn, &lt;span style="color: blue"&gt;string &lt;/span&gt;propName, &lt;span style="color: blue"&gt;object &lt;/span&gt;val) {&lt;br /&gt;
    &lt;span style="color: green"&gt;// Warning: this is rather expensive,&lt;br /&gt;    // and should be cached in a real app
    &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;SetterSite = &lt;br /&gt;      &lt;span style="color: #2b91af"&gt;CallSite&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;CallSite&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;&lt;br /&gt;      .Create(
        &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpSetMemberBinder&lt;/span&gt;(propName,
          dyn.GetType(),
          &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpArgumentInfo&lt;/span&gt;[] {
            &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpArgumentInfo&lt;/span&gt;(&lt;br /&gt;              &lt;span style="color: #2b91af"&gt;CSharpArgumentInfoFlags&lt;/span&gt;.None, &lt;span style="color: blue"&gt;null&lt;/span&gt;),
            &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CSharpArgumentInfo&lt;/span&gt;(&lt;br /&gt;              &lt;span style="color: #2b91af"&gt;CSharpArgumentInfoFlags&lt;/span&gt;.LiteralConstant |
              &lt;span style="color: #2b91af"&gt;CSharpArgumentInfoFlags&lt;/span&gt;.UseCompileTimeType,&lt;br /&gt;              &lt;span style="color: blue"&gt;null&lt;/span&gt;)
          }));
    SetterSite.Target(SetterSite, dyn, val);
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Once we have that, implementing the custom type provider is relatively straightforward. The only part that is not immediately obvious is how to enumerate the properties of the dynamic object.&lt;/p&gt;

&lt;p&gt;This is done as follows. Dynamic objects implement &lt;a href="http://msdn.microsoft.com/en-us/library/system.dynamic.idynamicmetaobjectprovider(VS.100).aspx"&gt;IDynamicMetaObjetProvider&lt;/a&gt;, which has a &lt;a href="http://msdn.microsoft.com/en-us/library/system.dynamic.idynamicmetaobjectprovider.getmetaobject(VS.100).aspx"&gt;GetMetaObject&lt;/a&gt; method, which returns a &lt;a href="http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicmetaobject(VS.100).aspx"&gt;DynamicMetaObject&lt;/a&gt; object on which you can call &lt;a href="http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicmetaobject.getdynamicmembernames(VS.100).aspx"&gt;GetDynamicMemberNames&lt;/a&gt; to get the list of members.&lt;/p&gt;

&lt;p&gt;We can now take any dynamic object and for example present it in a property grid, which is one of those components that know how to handle custom type descriptors but not the new dynamic objects:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;dynamic &lt;/span&gt;person = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ExpandoObject&lt;/span&gt;();
person.FirstName = &lt;span style="color: #a31515"&gt;&amp;quot;Bertrand&amp;quot;&lt;/span&gt;;
person.LastName = &lt;span style="color: #a31515"&gt;&amp;quot;Le Roy&amp;quot;&lt;/span&gt;;
person.Children = 2;
propertyGrid1.SelectedObject = &lt;br /&gt;    &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DynamicTypeDescriptorWrapper&lt;/span&gt;(person);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;And here’s what the results look like:&lt;img style="border-bottom: 0px; border-left: 0px; margin: 10px auto; display: block; float: none; border-top: 0px; border-right: 0px" title="PropertyGrid displaying a dynamic object." border="0" alt="PropertyGrid displaying a dynamic object." src="http://weblogs.asp.net/blogs/bleroy/DynamicPropertyGrid_5E24750E.png" width="304" height="207" /&gt; &lt;/p&gt;

&lt;p&gt;In conclusion, I’d say that although we are having a healthy debate on the dynamic keyword (and we should have that debate), I’m confident that in one or two years, we’ll have some incredibly imaginative uses of the feature that will simply blow us away and will make the current conversation a little sillier than it seems today. The feature itself is also in its infancy and not only will the use cases emerge way beyond what even its designers envisioned, it will also grow and become more usable with future versions of the language, as is made clear by the gap in functionality that still exists today with the full DLR project.&lt;/p&gt;

&lt;p&gt;You can download the code for this article here:
  &lt;br /&gt;&lt;a title="http://weblogs.asp.net/blogs/bleroy/Samples/Bleroy.Sample.Dynamic.zip" href="http://weblogs.asp.net/blogs/bleroy/Samples/Bleroy.Sample.Dynamic.zip"&gt;http://weblogs.asp.net/blogs/bleroy/Samples/Bleroy.Sample.Dynamic.zip&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7209018" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/bleroy/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/Dynamic+languages/default.aspx">Dynamic languages</category></item><item><title>JSON-style dictionary parameters in C#?</title><link>http://weblogs.asp.net/bleroy/archive/2007/09/24/json-style-dictionary-parameters-in-c.aspx</link><pubDate>Mon, 24 Sep 2007 22:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4120146</guid><dc:creator>Bertrand Le Roy</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/bleroy/rsscomments.aspx?PostID=4120146</wfw:commentRss><comments>http://weblogs.asp.net/bleroy/archive/2007/09/24/json-style-dictionary-parameters-in-c.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;Eilon has an interesting post about using the new anonymous object initializer syntax in APIs that take dictionaries. The end result looks very much like the JSON parameterized function calls that are very common in many JavaScript frameworks, which shows once more how C# is getting many of the nice features of dynamic languages while remaining statically-typed. While I wouldn't use that just to get named parameters like those frameworks are often doing,&amp;nbsp;it looks well-justified in this context because the parameter&amp;nbsp;it's being used for&amp;nbsp;is actually not predetermined.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A href="http://weblogs.asp.net/leftslipper/archive/2007/09/24/using-c-3-0-anonymous-types-as-dictionaries.aspx"&gt;http://weblogs.asp.net/leftslipper/archive/2007/09/24/using-c-3-0-anonymous-types-as-dictionaries.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4120146" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/bleroy/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/Dynamic+languages/default.aspx">Dynamic languages</category></item><item><title>Dynamic languages in ASP.NET</title><link>http://weblogs.asp.net/bleroy/archive/2006/11/03/Dynamic-languages-in-ASP.NET.aspx</link><pubDate>Fri, 03 Nov 2006 21:33:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:805805</guid><dc:creator>Bertrand Le Roy</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/bleroy/rsscomments.aspx?PostID=805805</wfw:commentRss><comments>http://weblogs.asp.net/bleroy/archive/2006/11/03/Dynamic-languages-in-ASP.NET.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/davidebb"&gt;David Ebbo&lt;/a&gt; wrote &lt;a href="http://www.asp.net/ironpython/WhitePaper.aspx?tabid=62"&gt;a very interesting article&lt;/a&gt; that explains in great details how they gave ASP.NET the ability to be driven by dynamic languages. The compilation system, on which David worked for a few years, is explained, as well as why it doesn&amp;#39;t apply to dynamic languages. Then he goes on to explain how they were able to integrate&amp;nbsp;&lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython"&gt;IronPython&lt;/a&gt; anyway, taking advantage of an existing feature, no-compile pages.&lt;/p&gt;&lt;p&gt;One of the surprising things is that dynamic languages will actually perform better for a whole class of applications.&lt;/p&gt;&lt;p&gt;Check it out: &lt;a href="http://www.asp.net/ironpython/WhitePaper.aspx?tabid=62"&gt;http://www.asp.net/ironpython/WhitePaper.aspx?tabid=62&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=805805" width="1" height="1"&gt;</description><enclosure url="http://weblogs.asp.net/bleroy/attachment/805805.ashx" length="38966" type="image/jpeg" /><category domain="http://weblogs.asp.net/bleroy/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/bleroy/archive/tags/Dynamic+languages/default.aspx">Dynamic languages</category></item></channel></rss>