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

allow tuple destructing in for loop and match arms #1312

Open
alex-s168 opened this issue Mar 5, 2025 · 2 comments
Open

allow tuple destructing in for loop and match arms #1312

alex-s168 opened this issue Mar 5, 2025 · 2 comments

Comments

@alex-s168
Copy link
Contributor

alex-s168 commented Mar 5, 2025

title

(was briefly discussed on the discord)

@andrew-johnson-4
Copy link
Owner

andrew-johnson-4 commented Mar 5, 2025

Permit tuple destructuring in all left-hand-sides.

for (let x, set y) in xys { ... }

match xys {
   (let x, set y) => { ... }
}

etc.

@andrew-johnson-4
Copy link
Owner

Note: bindings should be encouraged to use explicit set x or let x.

(let a, set b) = (1, 2);

instead of just

(let a, b) = (1, 2);

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

No branches or pull requests

2 participants