Good examples, Hubert.I think the optimal solution
for Java, C#, and script languages is just-in-time
compiling. Actually, I don't understand why there are
so many slow applications out there that don't use JIT
compiling :-)
The code only has to be compiled the
first time it is run. Or - why not distribute it in
compiled form for ForwardCom? The compiled code is
guaranteed to be forward compatible with future
ForwardCom processors.
The compiled code can easily
be linked to C/C++ code in the JIT process. The
calling conventions of ForwardCom are standardized to
work across different programming languages.
You
are probably right that interprocess communication is
a good solution for plug ins if you don't want the
plug in to have access to mess with everything in the
mother program.
To load in C++ objects, the Java code calls System.loadLibrary("name"), which on windows loads "name.dll" and on posix loads "libname.so", so you still need either dynamic linking or arbitrary on-the-fly recompilation phases on already running apps, because your Java code is already running when you learn that you have to load this library. Another similar mechanism in Java is ClassLoader, which dynamically loads in more Java code into an already running app from arbitrary jar files on the disk (it's basically the Java equivalent of loading DLLs).