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

Generic details 12: parameterized types #1146

Merged
merged 14 commits into from
Apr 28, 2022
Merged

Generic details 12: parameterized types #1146

merged 14 commits into from
Apr 28, 2022

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Mar 21, 2022

This proposal has three main contributions:

  • Types with generic parameters have an identity that consists of the types names plus the values of those parameters.
  • The parameters of a type may be deduced from a function's argument.
  • Types with generic parameters do not support specialization. Instead, a type can delegate to an interface to opt in to allowing specific customization points.

@josh11b josh11b added the proposal A proposal label Mar 21, 2022
@josh11b josh11b requested a review from a team March 21, 2022 19:45
@josh11b josh11b changed the title Generics 12: Parameterized types Generic details 12: Generic types Mar 21, 2022
@josh11b josh11b changed the title Generic details 12: Generic types Generic details 12: Parameterized types Mar 21, 2022
@josh11b josh11b marked this pull request as ready for review March 21, 2022 23:34
@josh11b josh11b requested a review from a team as a code owner March 21, 2022 23:34
@github-actions github-actions bot added the proposal rfc Proposal with request-for-comment sent out label Mar 21, 2022
@josh11b josh11b changed the title Generic details 12: Parameterized types Generic details 12: parameterized types Mar 23, 2022
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.

This looks good to me; only relatively trivial comments here.

docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
proposals/p1146.md Outdated Show resolved Hide resolved
proposals/p1146.md Show resolved Hide resolved
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Nice!

proposals/p1146.md 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.

LGTM with a couple of minor phrasing changes.

docs/design/generics/details.md Outdated Show resolved Hide resolved
docs/design/generics/details.md Outdated Show resolved Hide resolved
executable_semantics/syntax/parser.ypp Outdated Show resolved Hide resolved
josh11b and others added 2 commits April 28, 2022 16:12
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
@josh11b josh11b merged commit 8106914 into carbon-language:trunk Apr 28, 2022
@josh11b josh11b deleted the classid branch April 28, 2022 23:16
@github-actions github-actions bot added proposal accepted Decision made, proposal accepted and removed proposal rfc Proposal with request-for-comment sent out labels Apr 28, 2022
chandlerc pushed a commit that referenced this pull request Jun 28, 2022
This proposal has three main contributions:
- Types with generic parameters have an identity that consists of the types names plus the values of those parameters.
- The parameters of a type may be deduced from a function's argument.
- Types with generic parameters do not support specialization. Instead, a type can delegate to an interface to opt in to allowing specific customization points.

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
@chandlerc chandlerc added the documentation An issue or proposed change to our documentation label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An issue or proposed change to our documentation proposal accepted Decision made, proposal accepted proposal A proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants