GDQuest / GDQuest/learn-gdscript
Lessons and practices about loops: Consider explicitly call functions when possible over looping implicitly
- Dominant language
- GDScript
- Stars
- 2.8k
- Forks
- 235
- PR merge metrics
- No merged PRs in 30d
Description
GDScript has some syntax sugar to automatically loop over collections implicitly, like when you loop over a dictionary, it calls the keys() method to get a list of all the keys in the dictionary.
In L25, when looping over dictionaries, we end up using this in examples at the time because it's become idiomatic in GDScript. A learner suggested using explicit method calls and it's something to at least review and consider in the lessons. Just like how in Learn 2D Gamedev From Zero we ended up using `get_node()` a lot over syntax sugar to help learners wrap their head around the fact that you're just calling functions that follow a series of steps to return the result, that it's not magic.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the L25 lessons that demonstrate looping over dictionaries, then compare their examples with the explicit get_node() approach described in Learn 2D Gamedev From Zero. Done means deciding whether the relevant lessons should teach explicit method calls and documenting or applying that review consistently; the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100