Hi Sander,
I disagree here. What you see as a restriction is IMO a guarantee of future extensibility. Bear in mind that PixInsight is not actually an application. It is a software platform where three user interfaces coexist cooperatively: a GUI, a command-line interface, and a scripting interface. In addition, PixInsight is a development framework. This imposes an extra need for coherency.
Language grammars must be simple and coherent, along with capable of expressing powerful constructs with beauty and elegance. In the case of PixelMath --which is an essential part of PixInsight, as you know--, if the following PixelMath expression:
foo = "my-bar"
means "assign the current pixel of my-bar to variable foo", then it excludes the possibility of using literal strings in PixelMath. This is an improvement that I am implementing, which will be available in one of the upcoming new versions. For example:
a = Prompt( "Enter the coefficient value", 0, 1, 0.5 )
will open a dialog box with a label and a numeric field, then wait until the user enters a number between 0 and 1, with default value of 0.5. The dialog's result would be assigned to variable a in this case.
A solution to disambiguate image references would be a specialized function such as:
foo = ImageById( "my-bar" )
or even a macro-function such as:
foo = $IMGREF( my-bar )
but these are, IMO, unnecessary and inelegant. These constructs would spoil PixelMath syntax without adding new functionality, considering that image references are represented now in a completely natural way (as variables, which is what they are) thanks to strict view identifiers.
The problem isn't limited to PixelMath syntax. C-syntax view identifiers are necessary to guarantee future extensions of the scripting system where images will be handled as global variables. For example, PixelMath syntax can be extended to implement a more sophisticated scripting language with control structures. That language, specialized in pixel-by-pixel math, would be much more efficient than a dynamic language such as JavaScript (as happens now with PixelMath), and could be integrated with the GUI and the command-line, just as JavaScript scripts are integrated now. A loose identifier syntax is an obstacle to these and similar extensions.