Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/releases/v0.34.0.md

Nocter v0.34.0 Release Notes

Nocter v0.34.0 adds Unicode scalar values as one complete language and standard-library feature. Character literals, constants, ownership, native representation, UTF-8 traversal, owned text, formatting, hashing, and editor behavior now share the same scalar identity. The only implemented host and native target remains arm64-darwin.

Unicode Scalar Values

char is a distinct copy type containing exactly one Unicode scalar value:

let letter = 'λ'
let face = '\u{1F600}'
let dynamic = char.from_u32(128512) otherwise { return 1 }

The literal decoder accepts direct Unicode and the defined character escapes, rejects surrogates and out-of-range values, and keeps byte literals distinct. char exposes its scalar code point, UTF-8 width, basic ASCII classification, equality, ordering, formatting, and hashing.

UTF-8 Text Integration

str.len() remains a byte count. str.char_count() and str.chars() make scalar traversal explicit without allocating:

let text: &str = "Aλ😀"
for scalar in text.chars() {
    output.push(scalar)
}

Validation and iteration consume one package-internal UTF-8 decoder. String.push(char) and try_push(char) consume the corresponding single encoder and publish the new String length only after the complete encoded scalar has been written. Recoverable allocation failure therefore leaves the visible String unchanged.

Tooling

Tokens and AST JSON distinguish character literals from byte and string literals. Formatting preserves canonical authored spelling while normalizing surrounding layout. Hover reports char, inlay hints infer char, navigation reaches the ordinary standard declaration, member completion uses the standard instance index, and semantic tokens classify the complete character literal. Malformed literals remain source diagnostics rather than internal editor failures.

The new unicode-text.nct example executes mixed one-, two-, and four-byte scalar traversal, owned append, dynamic construction, and line output.

Compatibility and Non-goals

This release does not add grapheme clusters, normalization, Unicode property tables, case mapping, display width, locale behavior, scalar indexing, or implicit integer/byte/string conversion. Existing text search offsets and ranges remain UTF-8 byte offsets.

Candidate Qualification

Release-content commit b876301201105e061000e2d48c8d18246d11814d passed two independent complete workspace and warnings-denied Clippy runs, explicit public-HTTPS acquisition, no-default-features checking, deterministic documentation, every public example, native scalar execution, framed LSP analysis, reproducible packaging, fresh-home validation, immutability, and tamper rejection.

The retained arm64-darwin archive is 8,339,944 bytes with SHA-256 db0751b6e869a9d1dfb911a93b299d122b6cdb73ca9eb6d3cf6e97efcd7507f9. Publication will reuse this qualified archive without rebuilding it.