Replies: 2 comments 2 replies
-
I think this is more of a bug in the documentation. For example, The |
Beta Was this translation helpful? Give feedback.
-
We recently discussed the annotations vs keywords issue at a GDScript team meeting. While we have not been able to formalize a general rule about which option should be used for a new functionality, we have reached a consensus that existing keywords and annotations should not be affected. See:
This confusing statement was also corrected in the user manual by the above PR. Annotation semantics are mentioned in the contributor documentation. So I think all the questions raised here have been addressed. Thanks for your input! |
Beta Was this translation helpful? Give feedback.
-
In Godot 4.0 beta, the
onready
keyword has been turned into the@onready
annotation. I feel like there is a case to be made that this is confusing and inconsistent.The documentation for GDScript clearly states about the semantics of annotations (reference):
In my opinion
@onready
violates both of these statements:_ready
is a concern entirely internal to the node, so I would argue@onready
does not affect how the script is treated by external tools._ready
instead of during node creation is a significant change to how the statement behaves, so I would argue that@onready
does change behavior.Given this, I propose changing
@onready
back into theonready
keyword, like it was in Godot 3, as that would make it consistent with the stated distinction between annotations and keywords.As an added bonus, this change would in my opinion improve readability, because
onready
is used a lot and I find having lots of@
symbols makes the code harder to read beacause of the visual noise it creates.Beta Was this translation helpful? Give feedback.
All reactions