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

When we could use perform expression? #12

Open
macabeus opened this issue Dec 24, 2019 · 1 comment
Open

When we could use perform expression? #12

macabeus opened this issue Dec 24, 2019 · 1 comment
Labels

Comments

@macabeus
Copy link
Owner

macabeus commented Dec 24, 2019

At this moment, we could use perform only in three situations:

  • ExpressionStatement: perform 'foo'
  • AssignmentExpression: a = perform 'foo'
  • VariableDeclarator: let a = perform 'foo'

So we can't do something like: (perform 'foo') + 1, because it's a BinaryExpression.

But do we really need to maintain this behaviour?
If not, how would be the precedence?

@macabeus macabeus added the spec label Dec 24, 2019
@luizperes
Copy link
Collaborator

luizperes commented Dec 24, 2019

In my opinion perform should be an expression that "wraps" another expression, the way it is right now looks fine to me, so it would enforce the use of return

@macabeus macabeus mentioned this issue Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants