Unify declarations and record property presence - #93
Merged
Conversation
This was referenced Aug 16, 2026
A declaration answered two questions from one fact: whether a value may be absent, and whether the caller must supply one at all. The second was derived from the first, so an absence-admitting type could always be omitted — and a host with a "no value" answer could not tell the chosen answer from no answer yet. Input splits them. Input::of(Type) is the reading a bare Type already has; Input::demanded(Type) keeps what the type says about absence and overrides what it says about supply. Declarations normalize to Inputs at ingestion, so inference is handed the same Type map as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
robertvansteen
force-pushed
the
demanded-inputs
branch
from
August 18, 2026 15:20
0c7bae4 to
2e32b4e
Compare
robertvansteen
marked this pull request as ready for review
August 18, 2026 16:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RecordTypemodel for expression declarations and nested recordsnew Optional($type)as the explicit omission qualifierT,Option<T>,Optional<T>, andOptional<Option<T>>remain distinctReferencePathvalues through programs and diagnosticsSymbolSource(name, namespace)and dotted names as migration adapters, including member-access chains rooted in a namespaced symbolWhy
The previous proposal introduced a separate
Inputdeclaration model and retained flat names such ascustomer.turnover. That split presence policy from record structure and left declarations behaving differently from every nested record.This design makes a declaration simply the outer record type. Property presence belongs to the record property;
OptionTypecontinues to describe the value domain. Access paths remain structural at compiler interfaces and serialize as{root, properties}; dotted text exists only when a caller requests a human-readable description.SymbolSourceremains deprecated but readable as a migration boundary: its legacy namespace and dotted name are converted to the same structuralReferencePathused by native member access. New code can use structural sources without forcing hosts to rewrite persisted documents in the same release.Breaking changes
InputReferencePathand record-property segmentsProgram::$referencesandDiagnosis::$referencesaslist<ReferencePath>instead of dotted stringsnullOptionalCompatibility
SymbolSource(name, namespace)remains acceptedMemberAccessSourcepreserves the namespace of a deprecatedSymbolSourcerootValidation
git diff --check: passed