Skip to content

refactor: Expand variable names#319

Merged
elementbound merged 5 commits intomainfrom
refactor/rename-vars
Nov 3, 2024
Merged

refactor: Expand variable names#319
elementbound merged 5 commits intomainfrom
refactor/rename-vars

Conversation

@elementbound
Copy link
Copy Markdown
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