It sounds very much like the should be some major changes. I would expect some announcement within the next month or 2 but it might well be covered by an NDA.
Thanks for your replay. I have read the whole thread you mentioned, but there is no a single word about that issue.
I feel a bit more clarification is needed. Operators precedence is obviously considered too basic topic, to be covered in any InDesign Scripting Guide which I could find. In fact, the only place I found something on that subject is this After Effects CS6 Scripting Guide, which explicitly states on page 11, that '&' is with higher precedence than '|' operator. In fact, math operators are doing as expected, but logical operators have the same issue.
For me, there are two major lines:
1. This is not a bug but it's by jsx design. In that case no action from Adobe developers is needed, just to be explicitly pointed in the references and tutorials. AFAIK, any programming or scripting language conforms with the known mathematical, logical and bitwise order of operations. So this would be of a great difference.
2. It's a specific Adobe implementation bug. It must be addressed to Adobe team for resolution.
In both cases, i'd wish I knew that. Maybe not a big deal, but in my case the main problem is with the minified js libraries, where unnecessary (according to js specs) parentheses are removed. And there is no easy solution.
I posted the thread so you could see 2 points, 1 - that ExtendScript does not conform to the specifications, and hence you get some anomalies in how code functions. and 2 - that there is a debate about what to do with Scripting going forward, do Adobe update extendscript or move to a different framework (nodejs ........ ).
This was just to give you some understanding of where the ExtendScript library is, and the problems that can arise because of this.
I agree that it should be fixed/updated to match the specification but until such time as there is a approach chosen by Adobe as to how to move forward with ExtendScript, we pretty much have to work around the issues.
As always you can log the issue officially with Adobe here - Feature Request/Bug Report Form
Marked as correct