且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

嵌入式脚本环境的优点/缺点?

更新时间:2023-12-05 19:30:34

我没有经验嵌入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.