conventions: say why flip is spelled the Godot way - #311
Merged
Naruto merged 1 commit intoSep 13, 2026
Conversation
`flip_h` / `flip_v` with `is_flipped_*` readers is a departure: every sibling Player calls this pair `flipX` / `flipY`. It is the right call here — `Sprite2D` and `AnimatedSprite2D` already put `flip_h` on a 2D node, so that is what a Godot user reaches for, and an inspector row called `flip_x` sitting beside a Sprite2D's `flip_h` would read as a different feature rather than the same one. None of which was written down. §7 of the API conventions asks for the reason next to the code precisely because a departure with no stated reason is indistinguishable from a mistake to whoever reads it next — and the next reader of this file is someone auditing it against the family, who has no way to tell this from the drift they are hunting. Comment only. Rebuilt with scripts/build-extension.sh (compiles and links; the duplicate `_rust_eh_personality` warning is pre-existing) and ran scripts/run-tests.sh: 35 cases, 101 assertions, 0 failed, 0 skipped. Note for whoever runs that next — the first invocation after a build segfaults in the editor's layout load once the suite has already printed SUITE FINISHED, and the script still exits 0. A re-run is clean. Worth knowing, since an exit code of 0 after a crash is not a result.
Naruto
deleted the
conventions/say-why-flip-is-spelled-the-godot-way
branch
September 13, 2026 05:32
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
flip_h/flip_vwithis_flipped_*readers is a departure: every sibling Player calls this pairflipX/flipY.It is the right call here.
Sprite2DandAnimatedSprite2Dalready putflip_hon a 2D node, so that is what a Godot user reaches for, and an inspector row calledflip_xsitting beside a Sprite2D'sflip_hwould read as a different feature rather than the same one.None of which was written down. §7 of the API conventions asks for the reason next to the code precisely because a departure with no stated reason is indistinguishable from a mistake to whoever reads it next — and the next reader of this file is someone auditing it against the family, who has no way to tell this from the drift they are hunting.
Comment only. No code, no behaviour, no API.
Verification
scripts/build-extension.sh— compiles and links. The duplicate_rust_eh_personalitywarning is pre-existing and unrelated.scripts/run-tests.sh— 35 cases, 101 assertions, 0 failed, 0 skipped.One thing worth knowing about that runner
The first invocation after a build segfaults in the editor's layout load (
editor_node.cpp:6618,Parameter "singleton" is null) — after the suite has already printedSUITE FINISHED— and the script still exits0. A re-run is clean. Not caused by this PR (a comment cannot change codegen), but an exit code of 0 following a crash is not a result, and this is the kind of thing that quietly turns into a green tick over a suite that never ran.