Mercerenies / gdlisp

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

onready #17

Closed Mercerenies closed 2 years ago

Mercerenies commented 3 years ago

GDScript has an onready keyword which allows code for instance variables to be run in _ready rather than initialized at object creation.

onready var example = $ExampleNode

We need to consider if and how we're going to handle this.

  1. Support onready directly, as a modifier on defvar
  2. Provide no equivalent support and require variables to be explicitly assigned in the constructor
  3. Provide a macro that performs the same onready transformation but using our existing macro system
Mercerenies commented 2 years ago

Closed as of 8dbd5ab9ed3288ad5d53a545f6af50ebaad28ed8