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

Consider restrict closure syntax to be something like { || #8273

Closed
WindSoilder opened this issue Mar 1, 2023 · 1 comment · Fixed by #8290
Closed

Consider restrict closure syntax to be something like { || #8273

WindSoilder opened this issue Mar 1, 2023 · 1 comment · Fixed by #8290
Labels
enhancement New feature or request parser Issues related to parsing
Milestone

Comments

@WindSoilder
Copy link
Collaborator

WindSoilder commented Mar 1, 2023

Related problem

We have the concept about closure and block, but currently closure syntax can be the same to block, which leads to confusing behavior.

Like: { a a }, should it be a closure or block?

Describe the solution you'd like

I'd like to restrict closure syntax to be something like {|| 3 * 3}, or {|arg| arg * arg}

Describe alternatives you've considered

No response

Additional context and details

Actually I think it's relative to issue: #7575

I have a easy solution for it(check #8274), but it required closure to have more unique syntax.. or else the ut is broken

@WindSoilder WindSoilder added the enhancement New feature or request label Mar 1, 2023
@WindSoilder WindSoilder changed the title Consider restrict closure syntax only can be something like { || Consider restrict closure syntax to be something like { || Mar 1, 2023
@fdncred
Copy link
Collaborator

fdncred commented Mar 1, 2023

Ya, I'd support that clarification too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser Issues related to parsing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants