Skip to content
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

Using { a, b, .. } as data Instead of { a, b, ..rest } for Full Record Captures #7096

Open
Tracked by #7091
smores56 opened this issue Sep 18, 2024 · 5 comments
Open
Tracked by #7091
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@smores56
Copy link
Collaborator

smores56 commented Sep 18, 2024

As much as using { a, b, ..rest } as a way to capture the entirety of an open/constrained record would be obvious syntax based on the changes suggested in #7094, it implies that we would remove the a and b fields from rest, which as seen in Elm's development, would be an unperformant and messy feature to support. As such, we should just use the as data capture syntax on an open record to capture all fields.

@smores56 smores56 added enhancement New feature or request good first issue Good for newcomers labels Sep 19, 2024
@Aditya-PS-05
Copy link

@smores56
I am interested in solving this issue but want to do it under Hacktoberfest label. Can you please add hacktoberfest label and assign it to me.

@Aditya-PS-05
Copy link

@lukewilliamboswell ,
I am having some issues in finding the exact location of this functionality. Can you help by telling the appropriate location to look for it.

Is this is the location of this functionality?

fn canonicalize_closure_body<'a>(

@lukewilliamboswell
Copy link
Collaborator

I'm not familiar with this part of our codebase. I'm hoping @smores56 or someone else could help you with this.

@Anton-4
Copy link
Collaborator

Anton-4 commented Oct 8, 2024

I was surprised to find that { a, b, ..rest } is not currently supported, if I re-read the original issue this is clear.
Knowing that, perhaps this is too complicated for a good first issue @smores56?

@smores56
Copy link
Collaborator Author

Actually, this one will need to wait for #7097 to be implemented first. It's (presumably) an easy issue once that issue gets finished. @Aditya-PS-05 you should do something else first. Let me know if you need help selecting an issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants