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

Refining the precedence chart with if, struct literals, and links. #1089

Merged
merged 14 commits into from
Feb 25, 2022
Merged

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Feb 18, 2022

This is intended to be a more iterative edit to the chart:

  • Adding if and struct literals, since it came up in arithmetic.
  • Adding links to address a comment of mine about wanting references
  • Rephrasing slightly to reduce the implication that it's only for operators (particularly since I don't think we want to call if an operator)
  • Shifting operators below because similar (though I could also shift above, or make that a generic "expressions" table?)

@jonmeow jonmeow requested review from a team as code owners February 18, 2022 21:41
docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
jonmeow and others added 7 commits February 23, 2022 08:35
Copy link
Contributor Author

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, the links didn't work, fixing them requires tossing a pre-commit (I'll figure out an alternative, I'm just unhappy now)

docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
docs/design/expressions/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, happy for you to either re-add struct literals here or as a separate PR if you prefer.

docs/design/expressions/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with having a different precedence group for parens vs braces here, if that's what we need to do for links to work.

@jonmeow jonmeow merged commit e2ebfc1 into carbon-language:trunk Feb 25, 2022
@jonmeow jonmeow deleted the op-if branch February 25, 2022 02:00
chandlerc pushed a commit that referenced this pull request Jun 28, 2022
…1089)

This is intended to be a more iterative edit to the chart:

- Adding `if` and struct literals, since it came up in arithmetic.
- Adding links to address a comment of mine about wanting references
- Rephrasing slightly to reduce the implication that it's only for operators (particularly since I don't think we want to call `if` an operator)
- Shifting operators below because similar 

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants