gdext icon indicating copy to clipboard operation
gdext copied to clipboard

Low-hanging consistency fruits

Open Bromeon opened this issue 8 months ago • 0 comments

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

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

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 avatar Jun 11 '24 21:06 Bromeon