Mercerenies / gdlisp

Lisp on the Godot platform
GNU General Public License v3.0
139 stars 1 forks source link

Global Variables in REPL #113

Open Mercerenies opened 1 year ago

Mercerenies commented 1 year ago

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.

Mercerenies commented 1 year ago

Follow-on to #71.

Mercerenies commented 1 year ago

Deferred to 2.x