-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document GDScript "when" and clarify pattern guard docs #9787
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AThousandShips
added
enhancement
topic:gdscript
area:manual
Issues and PRs related to the Manual/Tutorials section of the documentation
cherrypick:4.3
labels
Aug 20, 2024
tetrapod00
force-pushed
the
gdscript-when
branch
from
August 20, 2024 16:27
f9a41bd
to
0901677
Compare
dalexeev
reviewed
Aug 21, 2024
tetrapod00
force-pushed
the
gdscript-when
branch
from
August 21, 2024 16:57
0901677
to
0403f1e
Compare
As a new-ish Godot user, I agree that a single term should be used consistently in the documentation. Prevents confusion in us new-comers. |
tetrapod00
changed the title
Add documentation for GDScript "when" statement
Document GDScript "when" and clarify pattern guard docs
Aug 22, 2024
dalexeev
reviewed
Aug 26, 2024
tetrapod00
force-pushed
the
gdscript-when
branch
from
August 26, 2024 16:31
0403f1e
to
2b8bde5
Compare
tetrapod00
force-pushed
the
gdscript-when
branch
from
August 26, 2024 16:39
2b8bde5
to
443d5e9
Compare
dalexeev
approved these changes
Aug 26, 2024
mhilbrunner
approved these changes
Aug 29, 2024
Thanks, merged. And thanks dalexeev for reviewing :) |
Cherry-picked to 4.3 in #10038. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:manual
Issues and PRs related to the Manual/Tutorials section of the documentation
enhancement
topic:gdscript
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9786.
Adds an entry for "when" to the table, which links to "match".
As for potential confusion about "pattern guards" vs "guard expressions":
So my impression is that you can create a match statement with a "pattern guard" which has an "expression". And you might call that expression a "guard expression", as the current docs section does. But these seem to be terms that are only implicitly defined in a one place in user-facing content, or perhaps terms from another language that are borrowed directly.
I changed the section header from "Pattern guards" to "Pattern guard expressions" so it can be found with
ctrl+f
both ways. Not too attached to that change.I mainly use C#, so a review from a GDScript expert would be appreciated.