-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Brace expansion should allow whitespace #16585
Comments
This is an intended behaviour. As such, changing it would require to follow the RFC process as describe in the CONTRIBUTING file Thank you! |
I understand that it is intended from the error message. I am more interested in knowing the why this is intended. Allowing whitespace allows for cleaner code. |
Basically because we have to parse it at runtime, and dealing with fewer exception led to faster/easier code. Feel free to dig through the last couple rounds of refactoring the underlying code: #13231 and #15219. Also, FWIW, your expansion can be simplified to:
|
Thanks for the links and for the heads up. 👍 |
Consider this example:
versus
Which one is easier to read?
Even the Error message itself makes the case:
I would suggest that
user.{firstName, lastName}
is simpler and more readable thanuser.{firstName,lastName}
.Am I missing something? Is there a legitimate reason that whitespace cannot be stripped out?
The text was updated successfully, but these errors were encountered: