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

Add description of differences between a single declaration with multiple bindings and multiple declarations with single bindings #202

Open
benblank opened this issue Sep 9, 2023 · 0 comments

Comments

@benblank
Copy link

benblank commented Sep 9, 2023

The Semantics section of the README emphasizes that using x = expr1, y = expr2; (multiple bindings in a single declaration) is only approximately equivalent to using x = expr1; using y = expr2; (single bindings in multiple declarations, but the same bindings in the same order) — and similarly for await using — but I didn't see a description of the practical differences between them. I also didn't see an existing issue addressing the differences and during a quick scan of the specification diff, I didn't notice a clear explanation, either.

To me, the emphasis on "approximate" equivalence implies that, while the differences between single-declaration/multiple-binding and multiple-declaration/single-binding semantics are not commonly relevant, there do exist differences which are situationally relevant. If that is the case, I feel that at least a quick summary of the differences and their potential relevance is warranted. If not, I feel that implication introduces confusion and that the emphases should be removed.

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

1 participant