嵌入式脚本环境的优点/缺点? [英] Pros/cons of embedded scripting environments?

查看:162
本文介绍了嵌入式脚本环境的优点/缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可用于.NET应用程序的几个脚本环境(例如:<一href="http://stackoverflow.com/questions/462311/scripting-language-for-embedding-into-c-net-applications">this帖子)。

There are several scripting environments available for .NET applications (e.g.this post).

我的问题是,什么是利用每个人的优点/缺点?

My question is, what are the pros/cons of using each of them?

的实例包括(但不限于)

Examples include (but not limited to)

  • 在PowerShell中
  • IronPython的
  • 的Lua
  • 的JavaScript

我试图决定采用科学应用其中的脚本工具,允许专家用户使用复杂的模型这样的互动,他们可以创造新的算法。

I am trying to decide which scripting tool to use in scientific applications to allow expert users to interact with complicated models such that they can create new algorithms.

推荐答案

我没有经验嵌入PowerShell中,但我会以为这是很像的IronPython的,它的最终深深地连接到CLR。

I don't have experience embedding Powershell, but I'm going to assume it's a lot like IronPython in that it's ultimately deeply connected to the CLR.

所以:

PowerShell中/ IronPython的

我想组这两个在一起,说的大的利好是直接能够通过CLR进行通讯。

I would group these two together and say the big positive is direct ability to communicate via the CLR.

的底片,这些可能是内存使用,并可能运行时的性能。虽然因为它将运行在CLR已经无论如何,它不应该有太大的差别。

The negatives for these may be memory use and possibly runtime performance. Although since it will be running in the CLR already anyway, it shouldn't be much of a difference.

的Lua / Javascript的

相似的两者会使用某种形式的P /最终调用API嵌入。 (或COM互操作)

Similar in that both would be embedded using some sort of P/Invoke API ultimately. (Or COM Interop)

优点:速度快,使用更少的内存。 缺点:P /调用,不受管理的code等。

Pro: Fast, less memory usage. Con: P/Invoke, unmanaged code, etc.

之间的Lua和Javascript:

Between Lua and Javascript:

Lua中甚至可能更快,不到Javascript的内存猪,但JavaScript有更熟悉的OOP和FP成语烤成的语言。

Lua may be even faster and less of a memory hog than Javascript, but Javascript has more familiar OOP and FP idioms baked into the language.

这篇关于嵌入式脚本环境的优点/缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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