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

Remove bare array creation from multi assign #4824

merged 1 commit into from Aug 13, 2017


Copy link

@RX14 RX14 commented Aug 12, 2017

Previously, a = 1, 2, 3 was parsed as a = [1, 2, 3]. This is a weird special case with strange side-effects such as a = 1, b = 2 being parsed as a = [1, b = 2] which is... not optimal. The previous statement can happen easily as a syntax error:

a = 1,
b = 2

This doesn't effect swapping expressions (a, =, 2) or destructuring (a, b, c = method()).

Copy link

I agree. This is too much sugar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants