Skip to main content

Style Guide

Klar’s style is strict for clarity.

Naming

  • Use camelCase for variables and functions
  • Prefer descriptive names over short names

Structure

  • Keep main small
  • Extract logic into typed functions

Control flow

  • Avoid deeply nested if chains
  • Use otherwise ... because "..." to document intent

Expressions

Precedence is not formally specified (ND).
Write with parentheses when in doubt.

Returns

Always return explicitly. Even void.