How does the DLR work?

吃可爱长大的小学妹 提交于 2019-11-30 09:18:07

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.

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. ;-)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!