views:

109

answers:

2

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.

+1  A: 

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.

So:

PowerShell / IronPython

I would group these two together and say the big positive is direct ability to communicate via the 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

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

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

Between Lua and Javascript:

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.

John Weldon
You mean there isn't a Native implementation of Lua or Javascript in .Net? How sure are you on that? It's a scripting language not a device driver.
Earlz
Good point @Earlz. I was thinking of the obvious or default implementation I suppose.
John Weldon
Is IronPython ready for expert end-users, if it were deployed within an app?
pomeroy
I believe IronPython is ready for expert end-users, yes.
John Weldon
A: 

I think you can get javascript off your list. It does not support complex numbers nor operator overloading ... so there seems to be no way to implement c=a+b if a,b,c are complex.

FFox