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

string literal juxtaposition #20575

Closed
JeffBezanson opened this issue Feb 11, 2017 · 1 comment
Closed

string literal juxtaposition #20575

JeffBezanson opened this issue Feb 11, 2017 · 1 comment
Labels
breaking This change will break code needs decision A decision on this change is needed parser Language parsing and surface syntax
Milestone

Comments

@JeffBezanson
Copy link
Member

"a"x is parsed as "a" * x, which is probably unintentional, especially given the a"b"c string macro syntax. It's very easy to remove, but when you do that "a"x becomes syntax for adding doc string "a" to variable x. Easy to see why that happens, but it's a bit odd. Should we just make "a"x a syntax error, requiring a space?

@JeffBezanson JeffBezanson added breaking This change will break code needs decision A decision on this change is needed parser Language parsing and surface syntax labels Feb 11, 2017
@ararslan
Copy link
Member

+1 to making "a"x a syntax error and requiring a space. The only time I've seen "a"x used as string literal juxtaposition on purpose is in code golf, which isn't exactly a compelling use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change will break code needs decision A decision on this change is needed parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

2 participants