Go Naming Conventions: A Practical Guide

Go naming guide drops; coders feud over taste, AI, and “bad” examples

TLDR: A clear Go naming guide sparked a fiery thread: fans praised its simplicity, critics questioned showing invalid examples, and a loud debate broke out over human “taste” vs. AI-generated names. It matters because naming shapes readable code—and the community is split on who should hold the pen.

A tidy new guide on how to name things in Go (the Google-born programming language) has the community buzzing. The post lays out simple rules—like what letters you can use, not starting names with a number, and picking clear word cases—and offers practical tips such as keeping acronyms consistent (think API or ID) and avoiding clashes with built‑ins. It even warns against confusing look‑alikes and fancy symbols, nudging folks to stick to plain letters for readability.

But the comments turned it into a full-on name war. The biggest fire? The classic “handcrafted code vs. let AI do it” debate. One camp insists naming is taste and craft—“artisan labor,” as one commenter put it—while another swats down the idea of outsourcing choices to bots with a very blunt takedown. Others nitpicked the guide’s “bad examples” for including names that the compiler would reject anyway—cue eye‑rolls asking why show the impossible. Practical voices chimed in with landmine warnings, like not naming a type the same as a method to avoid future pain. Amid the sparks, a calmer chorus praised the guide as refreshingly short and accurate—“like Go itself.” Verdict: simple rules, spicy thread, and plenty of taste-testing drama.

Key Points

  • Go identifiers may use Unicode letters, digits, and underscores, cannot start with a digit, and cannot be Go keywords.
  • Use camelCase for unexported identifiers and PascalCase for exported ones; keep acronyms (including ID) consistently cased within names.
  • Prefer ASCII letters for readability and ease of typing, despite Unicode being allowed.
  • Avoid naming collisions with Go’s built-in types and functions (e.g., int, bool, any; min, max, len, clear).
  • Avoid including types in names except to distinguish converted values; also avoid clashing with standard library package names, especially those imported.

Hottest takes

Parochialism here is saying “just use AI” in disguise. — piekvorst
Some of us want to write well thought-through code, rather than letting an AI just spew poorly thought-through unmaintainable shit. — johneth
Why even presenting this if it's rejected by the compiler? — qezz
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.