Skip to content

Conversation

SriramAnanth2912
Copy link

@SriramAnanth2912 SriramAnanth2912 commented Sep 8, 2025

Refactored GDScript code for full static typing compliance

In the docs, the GDScript code is dynamically type casted as var foo = 12.
I did static type casting for the GDScript code as var foo : int = 12.

Completely refactored the code as mentioned above and also added necessary statements explaining the static types used.

@SriramAnanth2912
Copy link
Author

This PR is a small contribution related to #6295.

@SriramAnanth2912 SriramAnanth2912 marked this pull request as ready for review September 8, 2025 20:03
@SriramAnanth2912 SriramAnanth2912 changed the title Update scripting_first_script.rst to static type Updated scripting_first_script.rst GDScript code from dynamic type to static type Sep 8, 2025
SriramAnanth2912 and others added 9 commits September 9, 2025 02:39
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Resolved all the suggestions
@SriramAnanth2912
Copy link
Author

Thank you for mentioning the mistakes. Will not repeat such style-related issues.

@SriramAnanth2912
Copy link
Author

SriramAnanth2912 commented Sep 9, 2025

There is an issue with the Turning Around part of this page for the readers.
Issue is described here.
since it is a minor issue, I didn't raise it as a separate issue.
There are two solutions proposed there.
Please suggest which one is more relevant here.
Both need additional text descriptions in the page

@SriramAnanth2912 SriramAnanth2912 marked this pull request as draft September 9, 2025 06:08
@SriramAnanth2912 SriramAnanth2912 marked this pull request as ready for review September 9, 2025 06:14
@SriramAnanth2912 SriramAnanth2912 changed the title Updated scripting_first_script.rst GDScript code from dynamic type to static type Updated GDScript code from dynamic type to static type Sep 9, 2025
@SriramAnanth2912
Copy link
Author

All suggested changes resolved, please re-review

@Calinou Calinou added enhancement topic:gdscript area:getting started Issues and PRs related to the Getting Started section of the documentation labels Sep 9, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

However, I'm not sure if we should add type hints only on this particular parge of the step-by-step tutorial. We should make sure all the step-by-step tutorials (script, 2D, 3D) feature type hints for consistency, as inconsistencies in this regard are likely to confuse beginners. See this issue: #11037

I still agree we should move all tutorials to use type hints in the long run, but we should make sure to do this in chunks that look logical to readers.

@SriramAnanth2912
Copy link
Author

Thank you for adding the labels. I’ll proceed with the remaining pages in the getting-started section and look forward to further contributions from the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:getting started Issues and PRs related to the Getting Started section of the documentation enhancement topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants