Skip to content

New content: tutorial on using C# Tuples #5432

Closed

Description

@BillWagner

There are a lot of good uses for tuples and deconstruction that create more readable and concise code. Consider:

  1. constructors that assign multiple fields.
  2. Assignment operators
  3. Equality tests
  4. GetHashCode implementations

There are likely others. This would show a few samples of the different techniques, and explain the pros and cons of each choice.

See #5390 - comment for discussion, and the start of a sample.

Activity

  1. added this to the milestone on May 31, 2018
  2. modified the milestones: , on Jul 2, 2018
  3. modified the milestones: , on Sep 24, 2018
  4. modified the milestones: , Sprint 147 (01/7/2019 - 01/25/2019) on Dec 17, 2018
  5. self-assigned this
    on Jan 8, 2019
  6. BillWagner commented on Mar 19, 2019

    @BillWagner
    MemberAuthor

    /cc @rpetrusha for your thoughts.

    I'm re-thinking this as a tutorial. Looking at the list of use cases, I think a tutorial would be more of a grab-bag of tips.

    Instead, I think handling these use cases as part of #8206, making the "what's new" articles interactive with an "explore" article to try the features in different scenarios.

  7. rpetrusha commented on Mar 19, 2019

    @rpetrusha
    Contributor

    I don't really see use cases as particularly good tutorial material, so I agree with your decision to not make them tutorials. I also think that they would benefit from interactivity. But I don't see them as related to what's new -- I think that they require separate branding. Often, Developers learning new features are typically concerned with the basics of the feature and at most a few practical applications, Following that, use cases expand the use of the feature into new areas. So this is clearly an advanced topic. It's also one that I think will be really valuable. Perhaps something like an Applying series (Applying tuples) that focuses on how tuples (or some other feature) can be used in practical ways in application development?

  8. BillWagner commented on Mar 19, 2019

    @BillWagner
    MemberAuthor

    I really like that idea @rpetrusha I've added that to my notes on validating the updated C# Guide TOC.

    In the short term, I'll add these into the "what's new" section.

    I can also see a future where older "what's new" content moves into an "applying" section. (Just thinking out loud on that one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions