Inconsistent Reference Syntax (Proposal) #4116
Closed
setanarut
started this conversation in
General Discussions
Replies: 1 comment
-
You're right, but it still enough intuitive. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue description:
In-editor reference pages and https://docs.godotengine.org use different syntaxes. docs.godotengine.org pages are formatted according to C++ syntax, not GDscript syntax. In Gdscript syntax, type definitions comes after the variable name(
a: int
). In documents, it comes first.(int a
) The return value type also does not conform to the Gdscript syntax.URL to the documentation page (if already existing):
https://docs.godotengine.org/en/latest/classes/class_node2d.html
On pages in the editor (screenshot below) for example,
apply_scale()
should be written as;For those used to the Gdscript, Golang and Rust syntax, the return value is perceived as const.
I always keep my eye on the right side for the return type because I'm used to the Go language.
Go and Rust screenshots
Summary
Document formats must conform to the GDscript syntax. Return type should be on the right.
Beta Was this translation helpful? Give feedback.
All reactions