Skip to content

docs/emitter-design: naming policy should be allowed to consult the source spelling for acronyms #717

Closed

Description

@OmarAlJarrah

Problem

Canonical words are lowercase: iOSVersion becomes i_os_version, HTTPServer2FA becomes http_server_2_fa. Casing those words back up gives IOsVersion and HttpServer2Fa. §4.12's Acronyms() table can fix known acronyms, but not mixed-case ones like iOS, and the rule against re-splitting cased strings is right for word boundaries.

Proposal

State that naming.Policy may consult Naming.Source to recover the casing of an acronym whose words the canonical form already fixes, never to find word boundaries. This keeps renderings like IOSVersion possible without reopening re-splitting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2Rarer spec shapes, or an IR decision to settle before the emittertype:docsDocumentation only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions