Every programming language has advantages and disadvantages which make it more suitable to a specific solution. Sometimes it makes sense to combine the advantages of two (sometimes more) languages to solve the “bigger picture” problem in the most efficient manner (execution time vs programming time, etc.).
Some programming languages play better together than others because they are closely related in design, and some also provide better interfaces to other programming languages, which are not directly related.
I know it’s impossible to list all the different combinations, but I’m interested in the interaction capability for simulation work between the most commonly used programming languages.
Typically there is a requirement for the following:
- Grunt work (fast as possible calculations) should support multi-threading
- Good code library support (e.g. math, statistics)
- User interface (e.g. simulation setup, plotting results)
- Operating system independence (Windows/Linux/Mac)
It’s obviously possible to use any two languages together in some way or another, but I know there are instances where it definitely makes more sense to do so.
Almost any scripting language (Perl, Python, Ruby, Lua, etc.) and C. You use the scripting language for rapid prototyping and then C to reimplement the slower parts.
C++ can also be used, but it has some features that are difficult to integrate as, for instance, virtual methods.
Then you have Jython, that’s a version of Python running on top of the JVM that plays quite nicely with Java, and there are a bunch of other JVM languages in the same position.
If you use .Net or Mono, at least in theory, all the languages supported should be able to call code in other languages.