Skip to content

Relax acronym guidance for UpperSnakeCase identifiers #292

Description

@ds84182

See here.

The current guidance for formatting acronyms can be confused for words or abbreviations.

As an example, a struct named "managed (Vulkan) Acceleration Structure" would be named ManagedAs<T> (where T is the level, either Top or Btm). ManagedAs<Top> doesn't seem like it's managing an acceleration structure (managing an as cast(?)), but ManagedAS<Top> makes this immediately apparent to someone familiar with Vulkan who knows the project is using KHR_acceleration_structure.

ETC is also one, since it could be confused with "et cetera" but that's a bit of a stretch.

Names that are just an acronym (like UUID and GUI) should have a strong recommendation to use title case for the acronym.

Relaxing the guidance would also be more in-line with rustc's non_camel_case_types lint, since it accepts acronyms (including UUID, etc.).

The guidance should also be extended to mention that _ and a singular lower-case letter (like x) is acceptable between digits. e.g. Mat3x4 and Packed24_8. I don't feel like making a different issue for this lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions