157. Enum variants are PascalCase, including Some and None (2026-11-21)
- Decision. Every enum variant is
PascalCase:Some(x),None,Ev.Add(v),Anchor.Start,Sign.Neg.trueandfalsestay lowercase literals. In a pattern a capitalized name is a variant or constant and a lowercase name always binds. - Why. Case then settles patterns with no lookup, so a mistyped or out-of-scope variant
can't silently become a fresh binding (Rust lints for this; Haskell and OCaml make it
grammar). Payload variants are constructors, and constructors are already capitalized
(
Edge(u, v)). It is the familiar spelling from Rust (Some/None) and Python (None). Chapters 01 and 02 had contradicted each other, and the corpus mixed both styles. - Reverse. Make variants
snake_casein chapters 01 and 02, rerun the sweep in reverse overspec/andcorpus/problems/, and drop theSome/Nonespellings from the lexer and parser.