WIP: Gazprea facelift based on 2025 feedback#89
Draft
Sir-NoChill wants to merge 6 commits intocmput415:masterfrom
Draft
WIP: Gazprea facelift based on 2025 feedback#89Sir-NoChill wants to merge 6 commits intocmput415:masterfrom
Sir-NoChill wants to merge 6 commits intocmput415:masterfrom
Conversation
- 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)
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.
Based on feedback from last year, I propose the following changes:
e.g. dynamic, static, ragged, all handled in the backend)
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.