Loading AI tools
From Wikipedia, the free encyclopedia
The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:
Original author(s) | Microsoft Dynamic Language Runtime Team |
---|---|
Developer(s) | .NET Foundation |
Initial release | April 16, 2010 |
Stable release | 1.3.1
/ December 2, 2021[1] |
Repository | github |
Written in | C# |
Operating system | Windows, macOS, Linux (Debian, Ubuntu) |
Platform | Common Language Infrastructure |
Type | System platform |
License | Apache License 2.0 |
Website | docs |
The DLR is used to implement dynamic languages on the .NET Framework, including the IronPython and IronRuby projects.
Because the dynamic language implementations share a common underlying system, it should be easier for them to 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# and Visual Basic .NET.
Microsoft's Dynamic Language Runtime project was announced by Microsoft at MIX 2007.[2][3]
Microsoft shipped .NET DLR 0.9 beta in November 2008,[4] and final 0.9 in December 2008. Version 1.0 shipped in April 2010. In July 2010, Microsoft changed the license of the DLR from the Microsoft Public License to the Apache License 2.0.[5] With the release of .NET 4, also in April 2010, DLR was incorporated into the .NET Framework itself.[6]
The open source DLR project hosted on GitHub has a few additional features for language implementers. After the July 2010 release, there was little activity on the project for some years. This was interpreted by a Microsoft developer who worked on IronRuby as a lack of commitment from Microsoft to dynamic languages on the .NET Framework.[7][8] However, there has been regular activity since 2016/17, leading to a number of improvements and upgrades.
In 2007, Microsoft initially planned to use the DLR for the upcoming Visual Basic 2010 (VB 10.0) and Managed JScript (ECMAScript 3.0) as well as Python and Ruby.[2][9][10][11][12]
The DLR work on Ruby and Python resulted in IronRuby, a .NET implementation of the Ruby language, and IronPython.[2]
By August 2009, Microsoft had announced it had no more plans to implement Managed JScript on the DLR.[13] Fredrik Holmström later independently contributed a JavaScript implementation for the DLR which he dubbed "IronJS" in the naming tradition of IronPython and IronRuby.
Like C#, Visual Basic can access objects from dynamic languages built on the DLR such as IronPython and IronRuby.[14][15]
PowerShell 3.0, released in Windows 8, was updated to use the DLR.[16]
IronScheme, a Scheme implementation,[17] was planning to build upon the DLR. This idea was abandoned because the DLR branch used by the project became out of sync with the trunk, and also because (according to the project coordinator) the current version of the DLR at that time could not support the majority of Scheme's requirements.[18]
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.[19] 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.[20] 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 the type of an object—as well as the members it contains—in dynamic languages 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.[21]
In contrast to other efforts like the Parrot virtual machine (with no dependencies) or Da Vinci Machine (built on Java's JVM by adding new bytecodes in the JVM instruction set), the DLR is built on top of the existing Common Language Runtime, the .NET Framework virtual machine.[22]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.