C# 4.0 – Dynamic Language Runtime

Dynamic languages are a class of high-level programming languages that execute at runtime many common behaviors that other languages might perform during compilation, if at all. Most of you probably spend most of your time in static languages. What are the differences?


Dynamic languages allow you to develop prototypes faster because you don’t need to worry about type.

I started to learn more about this here: https://channel9.msdn.com/pdc2008/TL10/. Jim Hugunin does a great job. I’m going to try to address his presentation in the form of a re-blog.

You can get his Powerpoint dec here ->Powerpoint Deck

This is a good high level view of what’s going on.


Components of the DLR (Dynamic Language Runtime)

Expression Trees-dealing with code at runtime that is easy to understand, optimized by the CLR at runtime.

Dynamic Dispatch – allow different languages to communicate

Call Site Caching – to provide good performance

More languages in the future

More languages will be built upon this.

You can talk to javascript objects, python, COM objects (for Office), .NET 


Open Source Efforts – DLR

DLR is an open source project which grew out of IronPython and IronRuby. Approved by OSI it is available to language implementers who need source to make their languages work better.

You can download it now here.



The evolution of dynamic language features



COM – Needs Dynamic Dispatch




Dynamic Languages match types at runtime



Sample Python Code



Note that Python has no types



Name and optional arguments




Finally, easier MS Office Integration




The Future - Past C# 4.0 – Allowing you to control the compilation process






Comments (2)
  1. Najam says:

    Good article. What tool you used to develop this, really colorful!

  2. Sateeshkumar Vootkur says:

    very excellent article about dynamic interaction with python by example. looking more articles from you.

Comments are closed.

Skip to main content