-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuple Types #156
Comments
Attempting this one... |
Writing up a plan of attack:
|
In addition to these, there's also dead code analysis on the tuple type to identify unused tuple fields. I think tuple types should just be serialized inline in memory on the stack, where e.g. Alternatively, we could store every tuple field in a separate register and treat tuples as syntactic sugar over simply having multiple variables. I personally think the former idea, rather than the latter, is a cleaner and more sensible implementation. |
Also, if we use the pointer and inline memory approach, we could reuse structs for dead code analysis and code generation since structs do the exact same thing. |
We should use the most sensible (i.e., not prematurely optimised) approach IMO, because breaking things out into registers can be done if needed by optimisation passes later. So I agree with using the former. |
@canndrew is this closed? |
I think it could remain open until destructuring is complete? Since tuple fields are inaccessible as of now, the tuples feature isn't fully ready |
Closing and opening a new issue, against my own words above ^ |
Tuple types, as they behave in Rust, should exist in our language. This issue tracks the parsing, type-checking, and code generation of tuple types.
The text was updated successfully, but these errors were encountered: