Skip to content
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

refactor: Expand variable names #319

Merged
merged 5 commits into from
Nov 3, 2024
Merged

refactor: Expand variable names #319

merged 5 commits into from
Nov 3, 2024

Conversation

elementbound
Copy link
Contributor

Merge of #305, #306, and #308

TheYellowArchitect and others added 5 commits November 3, 2024 10:44
Alternatively, could stay as `pe` and simply have the static typing
declaration like this:
```gdscript
var pe: PropertyEntry = _property_cache.get_entry(node)
```

I prefer the static typing declaration myself, e.g. because it gives you
the type and highlights it so you can just press `Ctrl` on it

Btw that commit chain is weird, should I try to rebase or squash or sth?
Has been a while since I did that

---------

Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
…ick` (#306)

The buffer inside `get_history()` can have only 2 possible variables:
`_inputs` and `_states`. Both have their dictionary key be a tick
(`int`)

---------

Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
It is easy to be confused with the variable names because of no static
typings.
`properties` for example are not properties but PropertyEntries.
It makes it confusing to the reader as to what any variable is,
especially new users to the codebase.

This PR had to be made because in the netfox discord I saw someone
asking 'how can I sync props' and someone asked 'properties or props'
and the reply was actually props ala prop hunt lol

Basically the current naming convention causes a lot of confusion.

The first suggestion and the implementation of this is to convert
`props` to `property_entries`
The second suggestion is to rename `property` of type `String` to
`property_name`, and have the name `property` be the `PropertyEntry`
itself. I am against this second suggestion because this repo has no
static typing as coding convention, so `property` being `PropertyEntry`
is just weird, while `property_entry` being of type `PropertyEntry` is
intuitive.

---------

Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
@elementbound elementbound merged commit 26f4e08 into main Nov 3, 2024
@elementbound elementbound deleted the refactor/rename-vars branch November 3, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants