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

Low-hanging consistency fruits #756

Open
Bromeon opened this issue Jun 11, 2024 · 0 comments
Open

Low-hanging consistency fruits #756

Bromeon opened this issue Jun 11, 2024 · 0 comments
Labels
c: engine Godot classes (nodes, resources, ...) quality-of-life No new functionality, but improves ergonomics/internals

Comments

@Bromeon
Copy link
Member

Bromeon commented Jun 11, 2024

This is a very cosmetic issue, and not urgent at all 🙂

The engine often uses different representations for the same thing. In some cases that's OK or would be hard to change, but in others it's a special case in codegen that may be simple to add. Just to brainstorm, doesn't mean we change all those:

Instance IDs

We have InstanceId, ObjectID (native structs, wraps u64), raw u64, raw i64, EncodedObjectAsID...

  • Occurrences of instance_id
  • Ideally we can replace everything with InstanceId
  • Heuristic: methods ending in _instance_id that return u64 or have an id: u64 parameter.

Intly typed enums

Duplicated types in manual and generated code

We already handled some (Side, Corner, Vector2Axis, Vector3Axis), there are a few remaining:

They don't necessarily need to be de-duplicated, but we could at least provide conversions.

Misc

  • _count methods (get/set) mostly use i32
    • unclear if usize is an option, although it's currently unsupported. Might be better to stick to i32, as it's not really inconsistent, just a bit harder to integrate with Rust.
@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: engine Godot classes (nodes, resources, ...) labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: engine Godot classes (nodes, resources, ...) quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

No branches or pull requests

1 participant