Skip to content

You lost me there... #25511

@bheimbaugh

Description

@bheimbaugh

The bullet list of types immediately preceding Program structure introduced by

...Every variable has a type that determines what values can be stored in the variable, as shown below.

is too advanced for an introduction. There is not enough context to understand why this is being discussed here. Is it necessary? What is the critical point to understand about this that requires it be included in the introduction?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

MSDN-WhiteKnight

MSDN-WhiteKnight commented on Aug 8, 2021

@MSDN-WhiteKnight
Contributor

Is it necessary?

Given the current shape of article, yes, IMO it is necessary. It is followed by the very complex example that involves custom implementation of generic collection class. People coming from other languages needs these explainations on class/valuetype differences to understand wihy the code like this:

class Entry
{
            public Entry Next { get; set; }
            ....
}

produces a linked list and not an invalid recursive layout. C++ would have very different syntax for that, for example. If we'd want to simplify this article, we could replace the example with something like "a function to calculate perimeter of rectangle", which resembles a real-world code somewhat, but does not require the full understanding of type system. Then we could move these type system explainations and generic stack sample into the next articles. But i doubt it is worth the effort, unless there's a lot of feedback that this article is too advanced.

bheimbaugh

bheimbaugh commented on Aug 8, 2021

@bheimbaugh
Author

Just my 2cents, but I think it would benefit from its own article/chapter where you could explain the subtleties and compare to other languages. As it is, it caused me to just stop reading and start skimming, which is a shame because everything up to this point is very clear and digestible. Thanks for listening.

BillWagner

BillWagner commented on Aug 9, 2021

@BillWagner
Member

Thanks for this discussion. I'll be reviewing these after C# 10 ships, and updating this section at that time. I'll look at these issues then.

BillWagner

BillWagner commented on Jul 8, 2025

@BillWagner
Member

closing as this has been addressed in prior updates.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @BillWagner@dotnet-bot@PRMerger20@MSDN-WhiteKnight@bheimbaugh

        Issue actions

          You lost me there... · Issue #25511 · dotnet/docs