Dynamic Language Support in the .NET 4.0 Framework | CodeGuru

Dynamic Language Support in the .NET 4.0 Framework

Introduction Welcome to this installment of the .NET Nuts & Bolts column! The focus of this article will be on the dynamic language support that will be released as a part of the upcoming 4.0 version of the .NET Framework. In order to run the examples contained within this article you’ll need to use an […]

Written By
CodeGuru Staff
CodeGuru Staff
Dec 11, 2009
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Introduction

Welcome to this installment of the .NET Nuts & Bolts
column! The focus of this article will be on the dynamic
language support that will be released as a part of the
upcoming 4.0 version of the .NET Framework. In order to run
the examples contained within this article you’ll need to
use an early preview such as a beta or CTP of the .NET
Framework 4.0 release.

Note: In order to run the examples contained within
this article you’ll need to use an early preview such as a
beta or CTP of the .NET Framework 4.0 release.

Dynamic Language Runtime (DLR)

Dynamic languages are those that have a loose coupling
between applications and data services. They involved
implicit typing, meta programming, and do not involve
compilation. The popularity of dynamic languages such as
Python, Ruby, and JavaScript can be seen all across the
Internet. To date Microsoft .NET has been about static
languages.

The argument for and against dynamic languages and static
languages has been around since programming languages were
first created. Each paradigm has its strengths and
weaknesses. The Common Language Runtime (CLR) is a common
platform introduced in Microsoft .NET 1.0 for statically
typed objects. Since the static paradigm was the only
paradigm supported, those seeking support for dynamic
languages were forced to turn elsewhere.

The Dynamic Language Runtime (DLR) introduces support for
dynamic languages on .NET. This creates the possibility of a
“best of” scenario where you can use from both paradigms.
The core infrastructure of the DLR includes expression trees
(such as LINQ), dynamic dispatch to different binders, and
call side caching to avoid resolving to the same location
more than once. The DLR interfaces with other platform types
via binders. There are binders that map dynamic objects to
statically typed .NET objects, a JavaScript binder that
allows binding directly to JavaScript in Silverlight
applications, COM objects, and Python and Ruby. It provides
a single programming experience for talking to all of these
environments that are not statically typed.



Figure 1 – Dynamic Language Runtime

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.