Implementation Status
The language reference describes Kairo as designed. This page lists where the current compiler falls short of it. Each entry is removed when the gap closes.
Not Compiled Yet
| Feature | Status | Meanwhile |
|---|---|---|
Vector literals (var v: [i32] = [1, 2, 3]) | Type-check and compile, but do not link: the built-in vector constructors are not implemented yet | Use an array [T; N] or a slice [T;] |
Set literals {a, b} | Not compiled | — |
Map literals {k: v} | Not compiled | — |
File-scope var | Not compiled | Move the variable into a function, or use eval for constants |
Initializing a const field in a constructor | Not supported | — |
Checked by C++, Not by Kairo
Access control is enforced, but the error comes from the C++ compiler at build time rather than as a Kairo
diagnostic. This covers priv constructors and writes to const fields.
Not Diagnosed
Passing a slice literal to a function that stores the slice is not caught. The literal’s storage ends with
the statement, so the stored slice dangles. This becomes an error when Tether lands; until
then, pass a var or a [T] to any function that keeps what it is given. See
Primitives.
Three extend rules are not diagnosed yet:
- A plain
extendoutside the type’s file, or anextend ... implin neither the type’s nor the interface’s file, is accepted. See Same-File Restriction. - Calling an extension member whose bounds the type arguments do not satisfy is not reported at the call site. See Generic Extends.
- An
extend ... implthat is missing interface methods is not reported at theextenddeclaration. See Interface Conformance.
A generator that outlives the object it was created from, or
an @inout argument it was given, is not caught; it dangles. This becomes an error when
Tether covers generators. Until then, do not keep a generator longer than the object
it came from.
Language Gaps
- A Kairo
stringcannot be passed to a Cconst char*parameter;string.c_str()is planned. See C & C++ Interoperability. - Evaluation order is left to right for arguments, except for calls returning a C++ reference or class object and for primitive operators whose two operands both have side effects. See Operators.