Great ideas, Raccoon! Static variables would be very handy! However, it is important that both constants and statics are (as you stated) kept in memory, and not in files. The keyword here is improved speed and efficiency.

By your example, statics declared in the global scope (outside any alias or event) could easily replace constants, and still have almost the same functionality.

However, as I mentioned earlier, using constants would speed up script execution significantly, since it won't change at all during execution.

Imagine this benchmark:

Code:
Alias benchmark1 {
  ;Loop number one, using global variables
  set %i 1 | set %t 50000
  while (%i <= %t) {
    inc %i
  }
}
Alias benchmark2 {
  ;Loop number two, using constants and statics
  const %t = 50000 | static %i = 1
  while (%i <= %t) {
    inc %i
  }
}


When compared, the latter alias should execute alot faster than the first one.

(Notice that the constant is declared inside the alias in the above example, this should normally not be done, but it should still be a possibility)


Bloop