How does the DLR work?
Asked Answered
U

2

8

.Net 4 will have the a DLR (Dynamic Language Runtime). I know that it will be used for things like Iron Python and Iron Ruby. But is that all it's good for?

How is the DLR useful?

How does the DLR work?

Ursi answered 17/3, 2009 at 17:13 Comment(2)
en.wikipedia.org/wiki/Docklands_Light_Railway :)Surd
if its docklands light railway then- Like the rest of the trains in London- slow and unreliableCandlenut
C
8

It is useful for allowing developers to build a dynamic language more easily, compatibility between a dynamic language and CLR and dynamic languages(built on the DLR) with each other.

The DLR is built on top CLR and as such you will be able to access other .Net libraries. Multiple language support enables you to pick the right language for the right task. The DLR allows developers to more easily create your own dynamic language (which I think is a lot of developers dream)

It works by using Dynamic Code Generation(code generation at run time) Dynamic Type System(Change type at runtime and allow DLR languages to have a common communication platform) Dynamic Method Dispatch(Dynamic dispatching is dynamically being able to change which code executes for a method at runtime).

Basically the DLR dynamically generates code based off the expression tree. The expression tree is a list actions that is being sent to the DLR to compile and run.

I think the DLR is going to be a game changer. After the DLR is released I think you are going to see a bunch of new languages springing up as well as more ports of existing languages.

Candlenut answered 17/3, 2009 at 17:14 Comment(1)
Dynamic Code Generation == code generated at runtime, not compile time.Gadolinite
V
2

Another interesting use for DLR beyond serving as the "CLR bridge for dynamic languages" is to serve as the "CLR bridge for (potentially) any structured logic sequence representation".

In other words... a "dynamic language" could be a Visio flowchart, an XML document, data stored in a database, etc. DLR provides the tools to map from structured data to executable code. There's overlap here between DLR and WF... curious to see how that's going to play itself out.

If you consider what Oslo does (provide the tools to layer structure to otherwise unstructured "data") you can see where this is all going. Oslo + DLR is probably going to be a Very Big Deal over the next few years.

Naturally, some of us aren't just waiting around for this to happen on it's own. ;-)

Vesical answered 29/3, 2009 at 17:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.