Skip to content

[stack 20/20] spec(gazprea): permit nested aggregates and n-d arrays - #138

Closed
Sir-NoChill wants to merge 1 commit into
fix/example-correctionsfrom
feat/nested-composite-types
Closed

[stack 20/20] spec(gazprea): permit nested aggregates and n-d arrays#138
Sir-NoChill wants to merge 1 commit into
fix/example-correctionsfrom
feat/nested-composite-types

Conversation

@Sir-NoChill

Copy link
Copy Markdown
Collaborator

Open the type system to the settled "arbitrary nesting and arbitrary
structs" decision. Vectors, structs, tuples, and arrays may now hold any
storable element or field type, and fixed-size arrays generalize from the
two-dimensional matrix ceiling to arbitrary rank (T[n1]...[nk]). This
reverses the vector element-type restriction and the bans on nesting
structs/tuples inside structs and tuples.

A single authoritative rule lives at ssec:storable_types (types.rst):
everything except streams is storable; nesting is unbounded but must be
acyclic through value types; recursion is legal only through a vector,
the sole point of indirection. Each per-type page now defers to it, and
array.rst's element-type list is widened to match.

The >=2 field/element arity requirement is unchanged. Rank-agnostic
operations (a shape interface, n-d matrix multiply, broadcasting) are
left to a follow-up revision.

Refs: #132 #106 #82 #71 #101 #86
Assisted-by: Agent (claude) ai@blobfish.icu


Stack created with GitHub Stacks CLIGive Feedback 💬

@Sir-NoChill
Sir-NoChill marked this pull request as ready for review August 21, 2026 19:03
Open the type system to the settled "arbitrary nesting and arbitrary
structs" decision. Vectors, structs, tuples, and arrays may now hold any
storable element or field type, and fixed-size arrays generalize from the
two-dimensional matrix ceiling to arbitrary rank (T[n1]...[nk]). This
reverses the vector element-type restriction and the bans on nesting
structs/tuples inside structs and tuples.

A single authoritative rule lives at ssec:storable_types (types.rst):
everything except streams is storable; nesting is unbounded but must be
acyclic through value types; recursion is legal only through a vector,
the sole point of indirection. Each per-type page now defers to it, and
array.rst's element-type list is widened to match.

The >=2 field/element arity requirement is unchanged. Rank-agnostic
operations (a shape interface, n-d matrix multiply, broadcasting) are
left to a follow-up revision.

Refs: #132 #106 #82 #71 #101 #86
Assisted-by: Agent (claude) <ai@blobfish.icu>
@Sir-NoChill
Sir-NoChill force-pushed the feat/nested-composite-types branch from 6147b1f to f21f38c Compare August 21, 2026 19:05
@Sir-NoChill Sir-NoChill changed the title feat(gazprea): permit nested aggregates and n-d arrays [stack 20/20] spec(gazprea): permit nested aggregates and n-d arrays Aug 21, 2026
@Sir-NoChill

Copy link
Copy Markdown
Collaborator Author

Collapsed into #139 — a single consolidated PR of the whole stack (all 40 commits preserved). The flagged questions from this PR are aggregated in #139's description; this branch and thread remain here for reference. Closing in favour of #139.

Sir-NoChill added a commit that referenced this pull request Aug 21, 2026
Begin folding PR #106 into the consolidated spec, with review decisions.

- glossary: define `initialization` (renames #106's contested
  "elaboration") and `zero value` (RAII-const default; array padding).
- types/array.rst: new Sizing section and an Array-vs-Vector table, both
  stated for arrays of any rank per #138 -- not 2-D / base-type-only.
- Remove the `by` (stride) operator and `StrideError` entirely (it
  implies array views, which have no efficient implementation): the
  Stride operation, the precedence-table row, and the stride examples
  are gone.
- Concatenating two scalars is now a `TypeError`; at least one operand
  of `||` must be a composite value.

Refs #106.
Assisted-by: Agent (claude) <ai@blobfish.icu>
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