Skip to content

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

Closed

Description

@WindSoilder

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

Activity

  1. changed the title [-]Consider restrict closure syntax only can be something like `{ ||`[/-] [+]Consider restrict closure syntax to be something like `{ ||`[/+] on Mar 1, 2023
  2. fdncred commented on Mar 1, 2023

    @fdncred
    Contributor

    Ya, I'd support that clarification too.

  3. added
    A:parser
    on Mar 1, 2023
  4. added this to the v0.78.0 milestone on Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:parsercategory:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions