comptime, Because a Keyword Should Say When and Not Whether It ChangesStatus: Superseded by ADR-287 — its D1-D3 are D1, D2 and D8 there
Date: September 14, 2026
Amends: ADR-073 D1’s spelling and nothing else. Every
decision that record makes about what the declaration means stands unchanged
Related: ADR-051 D1 (a name may not be a reserved word),
ADR-071 D3 (a word is reserved against the possibility of a
construct, and un-reserving is the free direction), Part I 2.1 (mutability is
what mut says), Part II 10.2
ADR-073 reserved const and built the declaration under that
name. The name is the one every language in the neighbourhood uses, which is why
it was picked without an argument — and it is wrong here for a reason that only
shows up in this language.
const names immutability, and every binding in Nikaia already has it. Part
I 2.1 is explicit: a let cannot be assigned again unless it says mut. So a
keyword whose meaning is this one does not change would be a keyword that
distinguishes nothing. A reader who knows the language would ask what it adds,
and the honest answer would be nothing you could not already assume.
What the declaration actually promises is a time: this is evaluated while the program is built, and if it cannot be, the program is refused (ADR-073 D3). That is what the word should say.
comptime.comptime LIMIT = 4 * 1024
The word names the stage rather than a property of the binding. Zig is the
precedent and it is worth naming as one: the language that made compile-time
evaluation a first-class stage did not call it const either, and calls
its immutable binding const — the opposite assignment from the one here,
for a language whose default is the other way round.
const is a name, and a program that writes it as a declaration is told to write comptime.The word is not reserved (ADR-117). Written where a declaration
would stand, it is a name nothing declares, and the refusal every such name
gets carries the sentence: write comptime X = …. Declared as a name — a
parameter, a field — it is one.
ADR-073 D2 through D6 stand as written: where it may stand, that the type may be left out, that the fold must succeed, what may be in the initialiser, and that it is a value rather than a place. This record is about one word.
And the word does not travel downwards. What the emitter writes is Rust’s
const, because that is Rust’s name for the same slot. The two languages
disagree about which word means what, and the translation is where that stops
mattering.
One keyword instead of another. comptime joins the reserved list and
const is a name; a program that writes const as a declaration is told to
write comptime by the undeclared-name refusal (ADR-117 D2).
NK1127 keeps its number and changes one word — “a comptime is a let
that must fold”. The code was never about the spelling.
A reader of the generated file sees both words, one per language, and the test that covers the lowering says which is which where it could otherwise read as an inconsistency.
Yes. comptime is the 34th reserved word and the statement’s keyword;
const is reserved and parses nowhere. The six tests of
crates/nikaia/tests/comptime.rs are the same ones, renamed with the word, and
one of them compiles and runs the program.
What is not built is what was not built before this record either: the item
form ([#232](https://github.com/Nikaia-Language/Nikaia/issues/232), a comptime binding at item level
has nowhere to stand — by subject, because that page’s numbers move) and the
second stage of what an
initialiser may hold (ADR-073 D5).