While we can't support global variables in general (due to limitations in Godot's ability to load them), I'd like to support them in the REPL, just for convenience. Some sort of REPL-specific command like
(define-global x 100)
That would define an actual variable in scope called x. We can store in the GDLisp singleton or metadata or something, I don't care where. I just want it to be a real variable that can be accessed and set as though it's a local variable.
No need to ever close around or Cell-wrap such variables, as they're always global.
While we can't support global variables in general (due to limitations in Godot's ability to load them), I'd like to support them in the REPL, just for convenience. Some sort of REPL-specific command like
That would define an actual variable in scope called
x
. We can store in theGDLisp
singleton or metadata or something, I don't care where. I just want it to be a real variable that can be accessed and set as though it's a local variable.No need to ever close around or
Cell
-wrap such variables, as they're always global.