Skip to content

← All updates

v1.0 syntax

Syntax v1.0: Standard keywords

The final Fid syntax, adopted ahead of self-hosting. The original signature keywords are replaced with standard, universally understood ones.

The changes

OldNew
pffn
pvval
pv mutvar
pcconst
retreturn
tytype
pmremoved; use var x: T;

cap (capabilities/traits) and use ... with { ... } (capability grants) are kept. They are short, distinct, and part of Fid’s identity.

Why

  • Familiar over unique: every new user previously had to learn six unfamiliar keywords before writing a line of code.
  • AI-native: models are trained on billions of lines using fn- and return-style keywords; the original spellings fought that familiarity for zero benefit.
  • Self-hosting: the compiler will be written in Fid itself. Standard keywords make its source readable to every contributor.
  • Zero cost: keyword spelling has no effect on compile speed, binary size, or runtime performance.

The val/var pair (from Kotlin/Scala/Swift) gives a clean three-keyword binding model with const for compile-time values, and var without an initializer replaces the old pm keyword, backed by the same definite-assignment analysis.

Migration is mechanical: a single ordered find-and-replace converts a whole codebase. See the migration guide for the script and edge cases.