-
Notifications
You must be signed in to change notification settings - Fork 0
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
Destructuring assignment #1073
Labels
Comments
degory
added a commit
that referenced
this issue
Mar 10, 2024
Enhancements: - Destructuring assignment and variable initialization from tuples (see #1073) - Remove deprecated var statement
Merged
degory
added a commit
that referenced
this issue
Mar 10, 2024
Enhancements: - Destructuring assignment and variable initialization from tuples (see #1073) - Remove deprecated var statement
degory
added a commit
that referenced
this issue
Mar 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add support for destructuring assignment from tuples both for assignment statements and for variable initializers of let statements.
Even non-recursive destructuring of a single tuple into a flat list of variables would be very useful, but recursive destructuring is probably fairly easy to implement.
Destructuring of lists is probably less useful and is not a priority.
We should support placeholders for values we want to discard, e.g.
_
Destructuring from:
ValueTuple<T0, T1, T2, ...>
`0
,`1
,`2
, ...deconstruct(e0: T0 ref, e1: T1 ref, e2: T2 ref, ...)
Destructuring into:
Placeholders:
_
on the left hand side of assignments and initializersThe text was updated successfully, but these errors were encountered: