
08-14-2007, 05:36 AM
|
|
Incubator
|
 |
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
|
|
Variable Handling Revision
|
Variables in Graal are handled weirdly and I would like a server option available to change them into a form I think is better.
For the first thing, when you're trying to reference a variable without a prefix, I think there should be 4 places it looks.
#1. temp. variables
#2. this. static variables
#3. this. dynamic variables
#4. global variables
It would be returning the first one it finds.
Also when you're declaring variables without a prefix, I believe it should look for an existing variable in that same order, and if it can't find one, it should default to temp. not a global variable.
Of course that leaves the question, how are you going to declare global variables if the no-prefix defaults to temp.? Well in the function profiler and certain unusual scripting error messages, I noticed the prefix universe. I believe that prefix would be a good choice for declaring new global variables. Of course they could still be referenced without the universe. prefix if there are no temp. or this. variables of the same name.
Also note that dynamic variables are case-sensitive when static variables aren't, from my limited observations that is.
Edit: Would also be nice if there was some way to list the global dynamic variables. (Object names and things) Do I know if I'm overwriting something or not by using a global reference. |
|
|
|