|
|
|
|
Dynamic Language Runtime
|
| |
|
| |
The Dynamic Language Runtime (DLR) from Microsoft is an ongoing effort to bring a set of services that run on top of the Common Language Runtime (CLR) and provides language services for several different dynamic languages. These services include:
The DLR will be used to implement dynamic languages like Python and Ruby on the .NET Framework. The DLR services are currently used in the development versions of IronRuby, a .NET implementation of the Ruby language, and the upcoming IronPython 2.0.

Discussion
Ask a question about 'Dynamic Language Runtime'
Start a new discussion about 'Dynamic Language Runtime'
Answer questions from other users
|
Encyclopedia
The Dynamic Language Runtime (DLR) from Microsoft is an ongoing effort to bring a set of services that run on top of the Common Language Runtime (CLR) and provides language services for several different dynamic languages. These services include:
The DLR will be used to implement dynamic languages like Python and Ruby on the .NET Framework. The DLR services are currently used in the development versions of IronRuby, a .NET implementation of the Ruby language, and the upcoming IronPython 2.0. Microsoft plans to use the DLR for the upcoming Visual Basic .NET 10.0 (VBx) and Managed JScript (ECMAScript 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 2007. The DLR code currently lives in the IronPython 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, 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 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 of the method with the actual implementation.
In contrast to other efforts like Da Vinci Machine (which aim to add support for dynamic languages in the core of the Java Virtual Machine, thus planning to add new bytecodes in the JVM instruction set, and new JVM capabilities), the DLR is built on top of the existing Common Language Runtime, the .NET Framework virtual machine.
See also
|
| |
|
|