Replies: 3 comments
-
If we rename the property, we'd have to keep the old one around for backwards compatibility, so |
Beta Was this translation helpful? Give feedback.
-
I've gotten kind of used to this but I get where the issue would arise. The Resource class preemptively prefixed its properties with Not just for the caveat Calinou described, but also because there's could be few more properties to go through and rename as well. For example, I personally have to admit that the Node's As a point of reference, CanvasItem's And, overall, one could argue this to be the case for this property, as well. |
Beta Was this translation helpful? Give feedback.
-
this has been requested and discussed multiple times the problem is that has been since first Godot version, so all code that is already out there would break I agree that using |
Beta Was this translation helpful? Give feedback.
-
It comes too often that I want to define a property called "name", for example name of a character but have to use a different identifier to avoid conflict. For example, to use "character_name". It is ok, just a bit inconvenient. The key problem is that it is so easy to write error-prone code.
When I want to change the name of the character, I should write
But I find myself frequently write
It ends up with no editor or runtime error as it actually changes the name of the node, so this bug can be hard to find. Since "name" is such a common name and every node has to inherit from Node. I think it might be better to let Node not occupy this identifier and use a different one, such as "node_name" (as well as "set_node_name", "get_node_name").
Beta Was this translation helpful? Give feedback.
All reactions