You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #508, it would be nice to be able to assign multiple variables from a list in a single unwrapping statement.
Example
strictly split returns a list, but in cases like validate and extract, populating local variables with indexing leads to text that is a bit verbose. We currently have something like the following steps:
Let splitResult be the result of running strictly split given qualifiedName and U+003A (:).
Set prefix to splitResult[0].
Set localName to splitResult[1].
With something like #508 for list we could simplify these three steps into something like the following:
Set « prefix, localName » to the result of running strictly split given qualifiedName and U+003A (:).
I think in particular for strictly split it would be helpful if this worked on list-likes as well (the let-side could still use the tuple syntax I suppose), but maybe we ought to tackle that separately.
Summary
Similar to #508, it would be nice to be able to assign multiple variables from a list in a single unwrapping statement.
Example
strictly split returns a list, but in cases like validate and extract, populating local variables with indexing leads to text that is a bit verbose. We currently have something like the following steps:
With something like #508 for list we could simplify these three steps into something like the following:
Context
Originally posted by @annevk in #508 (comment)
Also related to whatwg/dom#1134.
The text was updated successfully, but these errors were encountered: