DLR 是如何工作的?

发布于 2024-07-15 09:20:23 字数 129 浏览 12 评论 0原文

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

DLR 有什么用?

DLR 是如何工作的?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莫相离 2024-07-22 09:20:23

它对于让开发人员更轻松地构建动态语言、动态语言与 CLR 以及动态语言(构建在 DLR 上)之间的兼容性非常有用。

DLR 构建在顶级 CLR 之上,因此您将能够访问其他 .Net 库。 多语言支持使您能够为正确的任务选择正确的语言。 DLR 使开发人员能够更轻松地创建自己的动态语言(我认为是很多开发人员的梦想)

它通过使用动态代码生成(运行时代码生成)来工作 动态类型系统(在运行时更改类型并允许 DLR 语言拥有通用通信平台)动态方法调度< /a>(动态分派能够动态地更改在运行时为某个方法执行的代码)。

基本上DLR 基于表达式树动态生成代码。 表达式树是发送到 DLR 进行编译和运行的操作列表。

我认为 DLR 将改变游戏规则。 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.

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.

花心好男孩 2024-07-22 09:20:23

除了充当“动态语言的 CLR 桥”之外,DLR 的另一个有趣用途是充当“(可能)任何结构化逻辑序列表示的 CLR 桥”。

换句话说...“动态语言”可以是 Visio 流程图、XML 文档、数据库中存储的数据等。DLR 提供了从结构化数据映射到可执行代码的工具。 DLR 和 WF 之间存在重叠...很好奇这将如何发挥作用。

如果您考虑奥斯陆所做的事情(提供将结构分层到其他非结构化“数据”的工具),您就可以看到这一切的发展方向。 奥斯陆 + 德国航空航天中心 (DLR) 可能在未来几年内成为一件大事。

当然,我们中的一些人不会只是等待这件事自行发生。 ;-)

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文