DLR如何工作? [英] How does the DLR work?

查看:81
本文介绍了DLR如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.Net 4将具有DLR(动态语言运行时)。我知道它将用于Iron Python和Iron Ruby之类的东西。但是,这一切都有好处吗?

.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?

DLR有什么用?

DLR如何工作?

推荐答案

使开发人员更轻松地构建动态语言,使动态语言与CLR和动态语言(基于DLR构建)之间相互兼容。

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.

DLR构建于页首CLR,因此您将可以访问其他.Net库。多语言支持使您可以为正确的任务选择正确的语言。 DLR使开发人员可以更轻松地创建自己的动态语言(我认为是很多开发人员梦dream以求的东西)

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)

它可以通过使用动态代码生成(运行时代码生成)来工作动态类型系统(在运行时更改类型,并允许DLR语言具有通用的通信平台)动态方法调度(动态调度可以动态地更改在运行时为方法执行的代码)。

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

基本上,DLR根据表达式树动态生成代码。表达式树是一个列表操作,将其发送到DLR进行编译和运行。

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.

我认为DLR将会改变游戏规则。在发布DLR之后,我想您会看到大量新语言涌现,以及更多现有语言版本。

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.

这篇关于DLR如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆