Skip to content

Add checked anything values and Boolean aliases to Ny and Matrix - #22

Merged
bytetroll merged 9 commits into
masterfrom
codex/anything-booleans
Oct 29, 2026
Merged

bytetroll merged 9 commits into
masterfrom
codex/anything-booleans

Conversation

@bytetroll

Copy link
Copy Markdown
Contributor

Add initialized, runtime-changing anything values to Ny and Matrix. Boxes preserve their exact concrete type across assignments, arguments, returns, fields, arrays, and caller references. Checked casts report the requested and stored types; anything_is<T> tests identity and nil.std.core.try_as<T> returns Option<T> for expected mismatches. Static aliases retain one compile-time type, and ownership or borrowed storage cannot be erased through a box.

Both languages accept boolean/flag and yes/no. Numeric Boolean conversion and storage accept only 0 and 1; text conversions share the same accepted spellings across VM and native execution. Diagnostics explain initialization requirements, checked extraction, and invalid Boolean values. Completion, highlighting, debugger values, language references, and the findings document cover the new contracts.

Validation also fixes native reference-cell GC retention after callee replacement, joined parallel-worker conversion errors, and a malformed-call parser crash. Native function values remain unsupported with an explicit diagnostic; VM function values are covered. Original-source locations after preprocessing remain documented follow-up work.

Validation: LLVM build; full CTest suite (528 passed, optional PostgreSQL integration skipped); 115 source route checks covering textual/binary NIL, interpreter bundles, JIT, AOT, rejected programs, and artifact preservation; 134 VS Code unit tests, extension type check, and production bundle.

This PR targets master. Integration PR #21 brings in the already-reviewed annotations, switches, and nilbuild work; merging it first reduces this diff to the dynamic-value and Boolean changes.

# Conflicts:
#	docs/design/README.md
#	matrix/docs/next-version-findings.md
Preserve annotation and NILData findings while carrying the current master integration through the stacked pull request. TypeScript checking and all 122 extension unit tests pass.
Preserve switch and NILData findings while propagating the current master integration through the stacked pull request. TypeScript checking and all 124 extension unit tests pass.
# Conflicts:
#	docs/design/README.md
#	matrix/docs/next-version-findings.md
@bytetroll
bytetroll merged commit a36a1b2 into master Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant