Getting syntax highlighting wrong

Subjective vs. measurable “best” highlighting

  • Thread splits between “pure preference” and “measurable UX” camps.
  • Some argue UI quality (including color schemes) can and should be evaluated at scale, even if individuals differ.
  • Others counter that results may be noisy and that even a good average outcome won’t fit everyone.

Color overload vs. information density

  • Many found the article’s “bad, colorful” examples easier to read than the proposed minimal scheme, especially the “find the function” test.
  • Several say their brains process lots of colors subconsciously; they only feel overload when using an unfamiliar theme.
  • Others strongly agree that “Christmas tree” themes are noisy and prefer very sparse highlighting or even none.
  • Middle-ground schemes (few distinct roles, limited palette) are widely favored.

Keywords, base color, and structure

  • Strong disagreement with “don’t highlight keywords”: many see keywords as the main structural cues for scanning control flow and definitions.
  • Colors for keywords, function calls, and properties often help catch typos because a token “looks wrong” even if the programmer can’t name its color.
  • Some insist typo detection is the job of diagnostics (squiggles), not syntax colors.
  • Several reject the notion of a “base text color” at all: in code “everything is something,” so a privileged default color feels meaningless to them.

Comments, literals, and semantics

  • Disagreement on comments: some want them emphasized (strong color, different font, markdown), others muted as secondary to code.
  • Highlighting literals (numbers/strings) is controversial: some see it as noise; others note it usefully exposes “magic numbers.”
  • There’s interest in semantic/scope-based schemes: per-identifier colors, lexical differential highlighting, color-by-scope or intent, rainbow brackets, etc., though some find these too colorful in practice.

Light vs dark and aesthetics

  • Preferences for light vs dark themes are polarized; several link it to ambient lighting.
  • The article’s bright yellow background with dark code blocks drew heavy criticism as visually harsh and undercutting its design authority.
  • Many emphasize familiarity and easy customization: the best scheme is often “the one you’ve used for years that your brain has learned.”