- I have never used javascript before.
A good reason to use it
- it is loosely typed
That's true. Static typing is something that ES4 tried to address, but unfortunately ES4 was dynamited in the way we know. On the positive side JavaScript is a fully dynamic language, which is one of its strongest points: everything is resolved at run time. There's no practical problem with this; it's just that good programming and design practices are even more important to write large scripts.
- the script is not easy to maintain in the internal editor if the length exceeds a few hundred lines (is there another IDE - best with integrated debugger?)
Well, I've written very large scripts with PI's Script Editor. One of them is MakefileGenerator with some 4000 lines and another is the PIDoc compiler with more than 5000 lines. We don't have a debugger but this is also in the to-do list; I am just waiting until Mozilla's JS debugger becomes stable.
Unfortunately you can't debug JavaScript scripts for PixInsight with another applications, mainly due to PI's scripting engine, which only exists in PI.
- in C++ I can separate for example GUI and logic in different classes and files and one DLL/shared object is installed. Is it possible to compile javascript from several project files to one bytecode "executable"
Absolutely. JavaScript is a fully object-oriented language. It doesn't use a class-based OO model, but a prototype-based model. Modularity is also possible, which is important for large projects. For example, I divided the PIDoc compiler script into seven source files where the compiler, the contents generators, the document generator and the GUI are separated into independent units.
- the Dialog is in principle modal in its nature - so user interaction appears to be limited.
Yes, script interfaces are always modal. This is a limitation that we'll overcome in the future, but not in the short-middle term. It is true that this involves a limitation in functionality, compared to PCL-based modules. For scripts implementing batch procedures this is no problem at all IMO. There are other tasks for which modal interfaces can work well, as those that require interactive image analysis.
This prevents me from adding additional functions like a final integration step where careful adjustment of parameters is necessary
Well, this depends on what you want to implement and how. Integration of master calibration frames, calibration and alignment can be implemented as a pipelined batch process. However, integration of light frames is a completely separate task; it doesn't have to be part of a calibration batch process IMO. The ImageIntegration tool provides many control data precisely for this reason: because the user has to fine tune parameters and evaluate control data to achieve the best result. There are other applications that prioritize simplicity over accuracy, but this is not the philosophy of PixInsight (just the contrary).