Dynamic Language Runtime

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Dynamic Language Runtime
Developer(s) Microsoft Dynamic Language Runtime Team
Stable release 1.0 / April 16, 2010
Operating system Microsoft Windows, Debian, Ubuntu
Platform CLI
Type System platform
License Apache License, v2.0
Website dlr.codeplex.com

The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime and provides computer language services for several different dynamic languages. These services include:

The DLR is used to implement dynamic languages on the .NET Framework, specifically by IronPython and IronRuby projects.

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# and Visual Basic .NET.

History

Microsoft's Dynamic Language Runtime project was announced by Microsoft at MIX 2007.[1][2]

Microsoft shipped .NET DLR 0.9 beta on the 26 November 2008,[3] and final 0.9 on 10 December 2008. Version 1.0 shipped on April 16, 2010. On 16 July 2010, Microsoft changed the license of the DLR from the Microsoft Public License to the Apache License, v2.0.[4] With the release of .NET 4, also in April 2010, DLR was incorporated into the .NET Framework itself.[5]

The open source DLR project hosted on CodePlex has a few additional features for language implementers, but there has been no activity on the project since the July 2010 release, which could be linked to what some, including a Microsoft developer who worked for IronRuby, saw as a lack of commitment from Microsoft to dynamic languages on the .NET Framework.[6][7]

Supported languages

The DLR services are currently used in the development version of IronRuby, a .NET implementation of the Ruby language, and for IronPython.[1]

In 2007, Microsoft planned to use the DLR for the upcoming Visual Basic 2010 (VB 10.0) and Managed JScript (ECMAScript 3.0).[8][8][9][10][11] However, as of August 2009, Microsoft has no more plans to implement Managed JScript (ECMAScript 3.0) on the DLR.[12] Like C#, Visual Basic can access objects from dynamic languages built on the DLR such as IronPython and IronRuby.[13][14]

PowerShell 3.0, released in Windows 8, was updated to use the DLR [15]

IronScheme, an upcoming Scheme implementation,[16] 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.[17]

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.[18] 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.[19] 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.[20]

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.[21]

See also

References

<templatestyles src="Reflist/styles.css" />

Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  1. 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. http://www.codeplex.com/dlr
  4. http://dlr.codeplex.com/license
  5. https://msdn.microsoft.com/en-us/library/dd233052.aspx
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. 8.0 8.1 Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. https://msdn.microsoft.com/en-us/library/ee461504.aspx#Y480
  15. http://huddledmasses.org/powershell-3-finally-on-the-dlr
  16. http://www.codeplex.com/IronScheme
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. Lua error in package.lua at line 80: module 'strict' not found.
  19. Lua error in package.lua at line 80: module 'strict' not found.
  20. Lua error in package.lua at line 80: module 'strict' not found.
  21. Lua error in package.lua at line 80: module 'strict' not found.