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

Specify the convenience method for List multiple assignment #638

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

dlrobertson
Copy link
Member

@dlrobertson dlrobertson commented Aug 11, 2024

Add documentation and a example to specify and document List mulitple assignment.

Fixes: #509

CC: @inexorabletash


Preview | Diff

@dlrobertson
Copy link
Member Author

First pass at adding multiple assignment for lists. Comments and critiques are very much welcomed

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for tackling this!

infra.bs Outdated Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
@annevk
Copy link
Member

annevk commented Aug 13, 2024

Should we also add an example where we have a size check before assignment?

infra.bs Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic thoughts?

I wonder if we should allow this same syntax to be used for splitting up a tuple. At least it was argued in the issue that using parenthesis here might not be clear enough and there's no need for disambiguation anyway.

infra.bs Outdated Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits. Thanks for adding this!

infra.bs Outdated Show resolved Hide resolved
infra.bs Outdated Show resolved Hide resolved
Add documentation and a example to specify and document List mulitple assignment.
Co-authored-by: Domenic Denicola <[email protected]>
@annevk annevk merged commit 9e59d76 into whatwg:main Aug 14, 2024
2 checks passed
@dlrobertson dlrobertson deleted the list-multiple-assign branch August 14, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Multiple assignment list unwrapping
3 participants