Skip to content

WIP: Gazprea facelift based on 2025 feedback#89

Draft
Sir-NoChill wants to merge 6 commits intocmput415:masterfrom
Sir-NoChill:sir-nochill/next
Draft

WIP: Gazprea facelift based on 2025 feedback#89
Sir-NoChill wants to merge 6 commits intocmput415:masterfrom
Sir-NoChill:sir-nochill/next

Conversation

@Sir-NoChill
Copy link
Collaborator

Based on feedback from last year, I propose the following changes:

  • A definition for constexpr
  • A revised version of vectors (now contained in arrays)
    • Ragged arrays as data structures only
    • Arrays as the root of all composites in gazprea (different classes,
      e.g. dynamic, static, ragged, all handled in the backend)
    • Well defined arrays of structs
  • A revised definition of tuples
    • Tuples and instantiation
    • Nested tuples
  • A set of extensions for students to further experiment with

Keeping this in a seperate folder from the current specification for the
moment, but would like comments on how we might like this system to
evolve. There are rough edges that I would like to smooth out in tuples
and arrays, and a solution compiler is underway (privately)

I would appreciate comments on the current direction, specifically with
respect to tuples and arrays.

- No more vectors, instead dynamic sized arrays
- Jagged arrays are in, but operations are restricted between multiple
  jagged arrays and jagged arrays with other types
- Scalable arrays are specified with `integer[*]` syntax
Tuples are back to being anonymous, but we have extended syntax to allow
for promotion to nominal types if required.

- `type T = (integer, real)` is legal and defines a type `T` that is a
  nominal type (so it is a true user-definied type, such that
  `T(1, 2.0) != (1, 2.0)`).
- tuples _must_ be explicitly declared when named using the `(a: 0, b: 1)`
  syntax.
- `typealias` syntax has been adapted to provide structural aliasing for
  a given type, rather than the creation of a nominal type.
TBH, mostly chatgpt generated.
Based on feedback from last year, I propose the following changes:
- A definition for constexpr
- A revised version of vectors (now contained in arrays)
  - Ragged arrays as data structures only
  - Arrays as the root of all composites in gazprea (different classes,
    e.g. dynamic, static, ragged, all handled in the backend)
  - Well defined arrays of structs
- A revised definition of tuples
  - Tuples and instantiation
  - Nested tuples
- A set of extensions for students to further experiment with

Keeping this in a seperate folder from the current specification for the
moment, but would like comments on how we might like this system to
evolve. There are rough edges that I would like to smooth out in tuples
and arrays, and a solution compiler is underway (privately)
@Sir-NoChill Sir-NoChill self-assigned this Feb 12, 2026
@Sir-NoChill Sir-NoChill requested a review from rcunrau February 12, 2026 21:35
@Sir-NoChill Sir-NoChill marked this pull request as draft February 12, 2026 21:40
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