All Topics  
Dynamic Language Runtime

 

   Email Print
   Bookmark   Link






 

Dynamic Language Runtime



 
 
The Dynamic Language Runtime (DLR) from Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 is an ongoing effort to bring a set of services that run on top of the Common Language Runtime
Common Language Runtime

The Common Language Runtime is a core component of Microsoft .NET Framework initiative. It is Microsoft's implementation of the Common Language Infrastructure standard, which defines an execution environment for program code....
 (CLR) and provides language services for several different dynamic languages. These services include:



The DLR will be used to implement dynamic languages like Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
 and Ruby
Ruby (programming language)

Ruby is a dynamic programming language, reflection , general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features....
 on the .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
. The DLR services are currently used in the development versions of IronRuby
IronRuby

IronRuby is an upcoming implementation of the Ruby targeting Microsoft .NET framework. It is implemented on top of the Dynamic Language Runtime, a library running on top of Common Language Runtime 2.0 that provides dynamic typing and dynamic method dispatch, among other things, for dynamic languages....
, a .NET implementation of the Ruby language, and the upcoming IronPython
IronPython

IronPython is an implementation of the Python targeting the .NET Framework and Mono , created by Jim Hugunin. Version 1.0 was released on September 5, 2006....
 2.0.






Discussion
Ask a question about 'Dynamic Language Runtime'
Start a new discussion about 'Dynamic Language Runtime'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The Dynamic Language Runtime (DLR) from Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 is an ongoing effort to bring a set of services that run on top of the Common Language Runtime
Common Language Runtime

The Common Language Runtime is a core component of Microsoft .NET Framework initiative. It is Microsoft's implementation of the Common Language Infrastructure standard, which defines an execution environment for program code....
 (CLR) and provides language services for several different dynamic languages. These services include:

  • A dynamic type system
    Type system

    In computer science, a type system may be defined as "a tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute."....
    , to be shared by all languages utilizing the DLR services
  • Dynamic method dispatch
    Dynamic dispatch

    In computer science, dynamic dispatch is the process of mapping a Message passing to a specific sequence of code at runtime. This is done to support the cases where the appropriate method cannot be determined at compile-time ....
  • Dynamic code generation
  • Hosting API


The DLR will be used to implement dynamic languages like Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
 and Ruby
Ruby (programming language)

Ruby is a dynamic programming language, reflection , general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features....
 on the .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
. The DLR services are currently used in the development versions of IronRuby
IronRuby

IronRuby is an upcoming implementation of the Ruby targeting Microsoft .NET framework. It is implemented on top of the Dynamic Language Runtime, a library running on top of Common Language Runtime 2.0 that provides dynamic typing and dynamic method dispatch, among other things, for dynamic languages....
, a .NET implementation of the Ruby language, and the upcoming IronPython
IronPython

IronPython is an implementation of the Python targeting the .NET Framework and Mono , created by Jim Hugunin. Version 1.0 was released on September 5, 2006....
 2.0. Microsoft plans to use the DLR for the upcoming Visual Basic .NET 10.0 (VBx)
Visual Basic .NET

Visual Basic , formerly called Visual Basic .NET , is an object-oriented programming computer language that can be viewed as an evolution of Microsoft Visual Basic implemented on the .NET Framework....
 and Managed JScript
JScript

JScript is the Microsoft dialect of the ECMAScript scripting language specification.JavaScript , JScript, and ECMAScript are very similar languages....
 (ECMAScript
ECMAScript

ECMAScript is a scripting language, standardized by Ecma International in the ECMA-262 Specification . The language is widely used on the World Wide Web, and is often confused with JavaScript or JScript, the two major Programming language dialect from which ECMAScript was standardized....
 3.0).

By having several dynamic language implementations share a common underlying system, it should be easier to let these implementations interact with one another. For example, it should be possible to use libraries from any dynamic language in any other dynamic language. In addition, the hosting API allows interoperability with statically typed CLI languages like C#.

History

Microsoft's Dynamic Language Runtime project was announced by Microsoft at MIX
MIX (Microsoft)

MIX is a Microsoft conference held annually for web developers and designers at which Microsoft showcases upcoming web technologies. The conference is held each Spring at the Venetian Hotel in Las Vegas Strip....
 2007. The DLR code currently lives in the IronPython
IronPython

IronPython is an implementation of the Python targeting the .NET Framework and Mono , created by Jim Hugunin. Version 1.0 was released on September 5, 2006....
 repository. Microsoft planned to ship a first usable 1.0 version of the DLR at the same time as IronPython 2.0, by the end of 2008 .

Microsoft shipped .NET DLR 0.9 beta on the 26 November 2008 , and final 0.9 on 10 December 2008.

Additional languages include the upcoming IronScheme, a Scheme implementation .

Architecture

The Dynamic Language Runtime is built on the idea that it is possible to implement language specificities on top of a generic language-agnostic abstract syntax tree
Abstract syntax tree

In computer science, an abstract syntax tree , or just syntax tree, is a directed tree representation of the abstract syntactic structure of source code written in a certain programming language....
, whose nodes correspond to a specific functionality that is common to many dynamic languages. This architecture is backed by the idea that the number of elementary language constructs that would have to be implemented on the generic stack should be inherently limited. The DLR dynamically generates
.NET metadata

.NET metadata, in the Microsoft .NET framework, refers to certain data structures embedded within the Common Intermediate Language code that describes the high-level structure of the code....
 code corresponding to the functionality expressed by these nodes. The compiler for any dynamic language implemented on top of the DLR has to generate DLR abstract trees, and hand it over to the DLR libraries.

The DLR provides dynamically-updated DynamicSite objects that cache the task of binding methods to objects. Since in dynamic languages, the type of an object, as well as the members it contain, can change during a program lifetime, a method invocation must check the method list to see if the invocation is a valid one. DynamicSite objects represent and cache the state of the object and its methods; any update to the object is reflected in the DynamicSite objects as well. DLR routes all method invocations via the DynamicSite objects, which then performs a fast lookup and binding
Binding (computer science)

In computer science, binding is the creation of a simple reference to something that is larger and more complicated and used frequently. The simple reference can be used instead of having to repeat the larger thing....
 of the method with the actual implementation.

In contrast to other efforts like Da Vinci Machine
Da Vinci Machine

The Da Vinci Machine, also called the Multi Language Virtual Machine is a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine to add support for Dynamic programming language....
 (which aim to add support for dynamic languages
Dynamic programming language

Dynamic programming language is a term used broadly in computer science to describe a class of high-level programming languages that execute at runtime many common behaviors that other languages might perform during compiler, if at all....
 in the core of the Java Virtual Machine
Java Virtual Machine

A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
, thus planning to add new bytecodes in the JVM instruction set
Java bytecode

Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode instruction or opcode is one byte in length; however, not all of the possible 256 instructions are used....
, and new JVM capabilities), the DLR is built on top of the existing Common Language Runtime
Common Language Runtime

The Common Language Runtime is a core component of Microsoft .NET Framework initiative. It is Microsoft's implementation of the Common Language Infrastructure standard, which defines an execution environment for program code....
, the .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
 virtual machine.

See also

  • Da Vinci Machine
    Da Vinci Machine

    The Da Vinci Machine, also called the Multi Language Virtual Machine is a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine to add support for Dynamic programming language....
    , an ongoing effort to bring support for dynamic languages on the Java Platform at the Java Virtual Machine
    Java Virtual Machine

    A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
     level.