According to your needs, here are some guidelines:
- Make a distinction between language and library – you can have mathematical languages (like MATLAB) or mathematical libraries called from an high-level language (like Python);
- The language (or library) should be designed by mathematicians, for mathematicians;
- The used language should be an existing one (do not reinvent the wheel);
- You should be able to share the script content with existing software;
- You should not start such a big complex project (math scripting) from scratch.
So I guess it could reduce the candidate list:
- JavaScript was not designed (not used) for such usage;
- Delphi scripts (DWS or PascalScript) were made mostly for automation, not calculation (and are not widely used);
- I don’t know why you are talking about using Delphi IDE in the customer application, but you should not use Delphi IDE for such proprietary development: a primitive custom IDE will be more productive than a full RAD;
- Lua should perhaps be considered: you can make whatever you want with this script engine – but there is not a huge community of mathematicians using Lua, unlike Python…
In the Open Source world, you could find a lot of very interesting solutions. See http://blog.interlinked.org/science/open_source_math_programs.html
I guess that Octave could be considered. It’s simple, powerful, mature, well known, used by a lot of software, and cross platform.
As far as I know, you can call Octave library from C/C++ code. It could be done from Delphi IMHO, after translation of the associated .h files.
But be aware of the GPL licence. If your software is proprietary, it could be impossible to distribute Octave as a part of your software. But you may call the Octave library or any other GPL stuff (like Python) from your software, if you make a clear distinction between your software and the GPL software.
Embedding Python could be a good solution. This language can be called from Delphi, and you should have a good architecture, without the need of calling directly some C libraries like Octave. Python could be your main gate to all other calculation libraries, from your Delphi application. For instance, Octave can be called from some Python libraries. And you can also use Python scripts to automate your own application. And you have some Python IDE in Delphi around. The Open Source license of every component being safe, of course. The more I think about it, the more I like this latter solution…
Just my two cents. 🙂