From Surf Wiki (app.surf) — the open knowledge base
Dynamic Language Runtime
System Platform
System Platform
| Field | Value |
|---|---|
| name | Dynamic Language Runtime (DLR) |
| author | Microsoft Dynamic Language Runtime Team |
| developer | .NET Foundation |
| released | |
| latest release version | |
| latest release date | |
| programming language | C# |
| operating system | Windows, macOS, Linux (Debian, Ubuntu) |
| platform | Common Language Infrastructure |
| genre | System platform |
| license | Apache License 2.0 |
| website |
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:
- A dynamic type system, to be shared by all languages using the DLR services
- Dynamic method dispatch
- Dynamic code generation
- Hosting API
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.
History
Microsoft's Dynamic Language Runtime project was announced by Microsoft at MIX 2007.{{cite web |access-date = 2008-02-09 |archive-url = https://web.archive.org/web/20080906190952/http://lists.ironpython.com/pipermail/users-ironpython.com/2008-January/006235.html |archive-date = 2008-09-06 |url-status = dead
Microsoft shipped .NET DLR 0.9 beta in November 2008, 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. With the release of .NET 4, also in April 2010, DLR was incorporated into the .NET Framework itself.
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.{{cite web | access-date = 2012-02-26}}{{cite web | access-date = 2012-02-26}} However, there has been regular activity since 2016/17, leading to a number of improvements and upgrades.
Language implementations
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.{{cite web | access-date = 2007-05-04}}{{cite web | access-date = 2009-08-12 | archive-date = 2009-05-25 | archive-url = https://web.archive.org/web/20090525130300/http://panopticoncentral.net/archive/2007/05/01/20383.aspx | url-status = dead | access-date = 2008-08-12}}{{cite web | access-date = 2009-08-12}}
The DLR work on Ruby and Python resulted in IronRuby, a .NET implementation of the Ruby language, and IronPython.{{cite web | access-date = 2007-06-21 }}
By August 2009, Microsoft had announced it had no more plans to implement Managed JScript on the DLR.{{cite web |access-date = 2009-08-12 |archive-date = 2009-08-31 |archive-url = https://web.archive.org/web/20090831184901/http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121 |url-status = dead
Like C#, Visual Basic can access objects from dynamic languages built on the DLR such as IronPython and IronRuby.{{cite web | access-date = 2009-08-12}}
PowerShell 3.0, released in Windows 8, was updated to use the DLR.
IronScheme, a Scheme implementation, 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.{{cite web |archive-url = https://archive.today/20130119115406/http://ironscheme.codeplex.com/Thread/View.aspx?ThreadId=55925 |url-status = dead |archive-date = January 19, 2013 |access-date = 2009-07-26
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.{{cite web | access-date = 2008-02-23}} 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.{{cite web | access-date = 2008-02-23}} 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.
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.{{cite web |access-date = 2008-02-23 |archive-url = https://web.archive.org/web/20080206064217/http://blogs.sun.com/jrose/entry/bravo_for_the_dynamic_runtime |archive-date = 2008-02-06 |url-status = dead
References
References
- "CodePlex Archive".
- "CodePlex Archive".
- (30 March 2024). "Dynamic Language Runtime Overview - .NET Framework".
- (25 February 2023). "Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic)".
- "PowerShell 3 – Finally on the DLR!".
- "CodePlex Archive".
- Bill Chiles. (October 2007). "CLR Inside Out: IronPython and the Dynamic Language Runtime". [[MSDN]] Magazine.
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Dynamic Language Runtime — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report