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

Add articles on record structs #25484

Closed
BillWagner opened this issue Aug 5, 2021 · 4 comments · Fixed by #26295
Closed

Add articles on record structs #25484

BillWagner opened this issue Aug 5, 2021 · 4 comments · Fixed by #26295
Assignees
Labels
🏁 Release: .NET 6 Issues and PRs for the .NET 6 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3

Comments

@BillWagner
Copy link
Member

BillWagner commented Aug 5, 2021

C# 10 adds record struct types. These types follow value semantics (as all value types do). The compiler generates many of the same methods as it does for record types. Some aren't applicable because they are only needed to support inheritance for record types.

In addition, record types can be declared as record class types to avoid potential confusion with record struct types.

Feature specification: Record structs

@BillWagner BillWagner created this issue from a note in .NET 6 Managed languages (To do) Aug 5, 2021
@PRMerger20 PRMerger20 added the Pri3 label Aug 5, 2021
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Aug 5, 2021
@BillWagner BillWagner changed the title [Record structs](https://github.com/dotnet/csharplang/issues/4334) Add articles on record structs Aug 5, 2021
@BillWagner BillWagner added the 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release label Aug 6, 2021
@dotnet-bot dotnet-bot added this to Child projects in .NET 6 documentation plan Aug 6, 2021
@BillWagner BillWagner added Pri1 High priority, do before Pri2 and Pri3 and removed Pri3 labels Aug 6, 2021
@BillWagner BillWagner self-assigned this Aug 6, 2021
@BillWagner BillWagner added this to To do in August 2021 via automation Aug 6, 2021
@BillWagner BillWagner added doc-idea Indicates issues that are suggestions for new topics [org][type][category] and removed ⌚ Not Triaged Not triaged labels Aug 6, 2021
@BillWagner
Copy link
Member Author

BillWagner commented Aug 6, 2021

To address this issue, the following tasks must be completed:

  • Update the language reference on record to include record struct. This should also point out that record class and record are the same type.
  • The language reference text on record struct should make it clear which methods are synthesized for record structs, and which are for record classes.
  • The Fundamentals article on Records needs to be updated to include record struct types.
  • The What's new tutorial on Records needs to be updated to include record struct types.

@BillWagner
Copy link
Member Author

Fix #24681 in the same PR as this issue.

@BillWagner BillWagner removed this from To do in August 2021 Aug 17, 2021
@BillWagner
Copy link
Member Author

Note that now all struct types support with expressions, not just record structs. That ripples through some of our language reference work on struct types.

@pkulikov
Copy link
Contributor

Note that now all struct types support with expressions, not just record structs. That ripples through some of our language reference work on struct types.

@BillWagner #26100 takes care of that.

@BillWagner BillWagner added this to To do in September 2021 via automation Sep 17, 2021
@BillWagner BillWagner moved this from To do to In progress in September 2021 Sep 28, 2021
@BillWagner BillWagner moved this from To do to In progress in .NET 6 Managed languages Sep 29, 2021
.NET 6 documentation plan automation moved this from Child projects to Done Sep 30, 2021
.NET 6 Managed languages automation moved this from In progress to Done Sep 30, 2021
September 2021 automation moved this from In progress to Done Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 6 Issues and PRs for the .NET 6 release doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants