mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
* styleguide: clarify "static typing" syntax I first explored making an update here because I felt the current docs were confusing: 1. I could not tell if everything below "bad" was actually bad... It seemed like some of it was "good". 2. The examples involving ` var health := 0 # The compiler will use the int type.` seemed redundant, and re: (1) it was confusing to see one in "good" and one in "bad". Do you agree whether a change is merited or did I misunderstand the docs as written? --- While writing this proposed update, I realize that my explanation is less focused on style, but instead also explaining how declared and inferred types work. Is that what we expect in the style guide, or is the intent to be laser-focused it on syntax and code clarity? If so, perhaps we should avoid explanation and use the linked static typing guide as the source of truth for a rich explanation: https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/static_typing.html#doc-gdscript-static-typing). Thanks for the awesome game engine! * clarify why it doesn't work in the get_node() case