Skip to content
Beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

19.3 Naming and style

Names that survive grep, review, and api.json without folklore.

Naming and style

Naming is not aesthetics—it is an API contract. Platform-spec Code style and naming is the normative baseline; this section is how you apply it without bike-shedding for three days.

KindCaseExample
Types, enums, contracts, variants, functions, methodsPascalCaseHub, WaitReceive, IsOk
Fields, parameters, localslowerCamelCaseisTty, index, caps
Module segmentsPascalCaseCore.Results
Testssnake_casehub_register_accepts_channel
MacroslowerCamelCaseidentity

Full rules: Code style and naming.

  • Name types for what they are, not what they were before the rewrite.
  • Avoid leaking Internal, Helper, Util into public paths unless you enjoy support tickets.
  • Align module names with folder layout (chapter 04)—surprises belong in fiction, not in import.
  • Mismatched case is an API smell even when the compiler accepts it today—W163x warnings are coming.