View Single Post
  #3  
Old 04-14-2003, 05:25 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
To change it would be to change the entire foundation of scripting. Allowing variable names to be specified by strings would make the engine far slower, because Graal would need to interpret the script dynamically - it would need to be converted to bytecode 20 times a second so that '#s(blah)' could reliably be converted to the correct token for 'this.somevar'. Sure, there could be optimisations, but it all amounts to one big headache for Stefan.

Perhaps it would be better to make a function, like:

var([insert string here])

Returns the variable with name equal to the string, so you could go:

var(this.#L)[4]=123;

That way it would be a special case handled by a special function, instead of the principle being applied to the entire scripting engine.
__________________
Reply With Quote