All this reminds me of LaTeX and how unusuable it is to do anything functional...
I would much rather see merging of Vexorian's script optimizer into JassHelper than new features that people use just because they think it is clever to use instead of actually because they are needed.
Automatic fixing of returned local non arg handles ; O (yes, they do leak pointers).
Not possible. There are situations where some handles are never removed so the reference counter is purposly left to leak as part of an optimization (eg local players which can never be truely destroyed). Some maps might also implement recycling systems for objects like timers and groups which again are unaffected by reference leaks due to never getting destroyed.
Eventually, at some point, it would be cool to be able to access object editor data from JASS. You could store it in a dictionary or something and then when you see something like Objects, you'll know that they want to read from the dictionary.
Or you could just mod StarCraft II where the game nativly supports such functionality. I would leave it at a macro command atmost which would look up the value at precompiler time.
Since we are covering pointless features, how about the ability to set arrays neatly?
set array = {N...a,b,c,d,e,etc}
Where N is an initial offset.
integer array arr
// set index 0 to 1 ... etc ... index 4 to 5
set arr = {1,2,3,4,5}
// set index 5 to 1 ... etc ... index 9 to 5
set arr = {5...1,2,3,4,5}
// also needs multi line support
Code:
set arr = {5...
1,
2,
3,
4,
5}
The precopiler generates the following.
set array = {N...a,b,c,etc}
becomes
JASS:
set array[N] = a
set array[N+1] = b
set array[N+2] = c
...
Obviously you apply a numeric constants optimizer to it so that an expression like
set arr = {5...1,2,3} // N is a constant
becomes
JASS:
set arr[5] = 1
set arr[6] = 2
set arr[7] = 3
The reason to introduce such a feature is to greatly improve the usability of arrays when storing bulk data (such as table entries).
Lets say we have a wave system for a towerdefense. Currently one has to apply a set line for each entry (wave) and compute the index manually. If you compute the index dynamicly then you incure a performance penalty for no reason (as the indexes you are setting are constant). With this feature it would allow you to set all waves with a single set statement and make changes such as deletion or insertion without having to recompute all the constant indexes. This becomes very user friendly for people to use such a system as they are modifying a table like structure rather than JASS arrays which a lot of people do not undertstand.
Even though it would support dynamic offsets, the advantage purly becomes code neatness rather than ease of use.