C# Language Design

repository·main·Indexed 11 days ago

https://github.com/dotnet/csharplang

The central hub for the development, debate, and specification of new C# language features. This repository contains the Language Design Meeting (LDM) archives from 2015 to 2025, documenting the design rationale and decision-making process for features such as Nullable Reference Types, Records, and Pattern Matching. It also includes the lifecycle and documentation for language proposals, including active, done, inactive, and rejected features.

Tokens
169.8K
Snippets
432
Records
675
Agent score
93%

What's inside C#

  1. Review C# Language Design meeting notes for 2018

    main
    The meetings/2018/README.md file serves as a chronological index of the C# Language Design meetings held throughout 2018. Each entry provides a link to detailed design notes (LDM-YYYY-MM-DD.md) covering specific language proposals, discussions, and technical decisions. Use this index to track the evolution of features such as Nullable Reference Types, Ranges, using declarations, and Pattern Matching during that year.
  2. Understand the C# Language Design Meeting (LDM) process

    main

    C# Language Design Meetings (LDM) are creative sessions where the C# Language Design Team and guests investigate, design, and decide on new language features.

    Purpose of Meeting Notes

    Meeting notes in this repository serve three primary functions:

    1. Recording decisions: Providing a source of truth for actions to be taken.
    2. Communicating design thinking: Sharing the logic with the community to solicit feedback.
    3. Recording rationale: Preserving the 'why' behind decisions for future reference.

    How to Participate and Provide Feedback

    • Reviewing Notes: Once meeting notes are finalized, a discussion issue is posted.
    • Commenting: You can provide quick comments directly on the discussion issue. For deeper or topic-specific discussions, it is recommended to open a separate issue.
    • Proposals: If meeting notes impact existing proposals, they will be tracked via proposal work items and updated by their respective champions.
  3. Review C# 2015 Language Design Meeting Notes

    main

    The meetings/2015 directory contains a chronological archive of C# language design meetings held throughout 2015. These notes document the evolution of features that eventually became part of C# 7 and subsequent versions.

    Key topics discussed during this period include:

    • Nullability: The development of nullable and non-nullable reference types.
    • Data Structures: The design of Tuples, Records, and deconstruction.
    • Performance & Reliability: Discussions on ref returns/locals, readonly locals, and slicing.
    • Pattern Matching: Early explorations into pattern matching capabilities.
    • Language Features: Local functions, expression tree extensions, and async streams.

    Each entry in the directory links to detailed markdown files (e.g., LDM-2015-01-21.md) containing specific agendas and design decisions.

  4. Review C# Language Design Meeting Notes for 2025

    main
    The meetings/2025 directory contains chronological logs of C# Language Design Meetings held throughout 2025. Each entry provides a link to a detailed meeting document and a list of the specific language features, proposals, or technical questions discussed during that session. These notes are useful for developers tracking the evolution of the C# language, upcoming features (like Unions, Extensions, and Dictionary expressions), and ongoing design discussions.
  5. Access C# 2017 Language Design Meeting Notes

    main
    The meetings/2017/ directory contains a chronological archive of C# language design meeting notes from 2017. These notes document the evolution, discussion, and decision-making process for major C# features such as Nullable Reference Types, Default Interface Members, and Async Main. Each entry links to a detailed markdown file (LDM-2017-XX-XX.md) containing the specific agenda and discussion points for that date.
  6. C# 7.1 Language Features Overview

    main

    C# 7.1 introduced several key language enhancements designed to improve developer productivity and expressiveness. The primary features included in this version are:

    • Async Main: Allows the Main method of a program to be marked as async, enabling the use of await directly within the entry point.
    • Default Expressions: Provides a way to use default in a target-typed manner, simplifying code when the type is already known from the context.
    • Infer Tuple Names: Enhances tuple usage by allowing the compiler to infer names for tuple elements based on the source expression.
    • Pattern-matching with Generics: Expands pattern-matching capabilities to work more effectively with generic types.
  7. Review C# Language Design Notes for 2019

    main
    The meetings/2019/README.md file serves as a historical index of C# language design meetings, agendas, and discussions held throughout 2019. It provides links to detailed design notes (LDM-YYYY-MM-DD.md) and GitHub issues that track the evolution of various C# features. Developers can use this index to trace the design rationale and decision-making process for specific language features discussed during that year.
  8. Low Level Struct Improvements in C# 11

    main

    C# 11 introduced several features aimed at improving the performance and flexibility of low-level struct types. These improvements focus on allowing ref fields and providing more granular control over lifetime defaults using the scoped keyword.

    Key features implemented in C# 11 include:

    • ref fields
    • scoped keyword
    • [UnscopedRef] attribute

    Note that some related proposals, such as ref fields within ref struct types and the sunsetting of restricted types, are intended for future versions of C#.

  9. Access C# 2021 Language Design Meeting Notes

    main
    The meetings/2021/ directory contains a chronological archive of C# Language Design meeting notes from 2021. Each entry provides an overview of the agendas discussed, including language proposals, design decisions, and open questions. Developers can use these notes to understand the rationale behind specific C# features and the evolution of the language during that period.
  10. Overview of `BinaryCompatOnlyAttribute`

    main
    The BinaryCompatOnlyAttribute is a proposed feature intended to assist with binary compatibility in the Base Class Library (BCL) and other libraries. While specific implementation details and usage patterns are still being defined, the attribute is intended to provide a mechanism for managing compatibility constraints. It has been moved into the active working set for further design and refinement.
  11. Targeting core collection interfaces with collection expressions

    main

    Collection expressions ([...]) are designed to be a replacement for various collection creation patterns (like new T[] { ... } or new List<T> { ... }). A key capability is the ability to target core BCL (Base Class Library) interfaces directly.

    When a collection expression is used where one of the following interface types is expected, the compiler must determine the most appropriate concrete implementation to instantiate:

    1. IEnumerable<T>
    2. IReadOnlyCollection<T>
    3. IReadOnlyList<T>
    4. ICollection<T>
    5. IList<T>

    This allows for highly permissive and idiomatic code, such as passing a collection expression directly to a method that accepts an interface, or initializing properties defined by interfaces.

    // Passing a collection expression to a method accepting an interface
    void DoSomething(IEnumerable<int> values) { ... }
    DoSomething([1, 2, 3]);
    
    // Initializing an interface property in a class
    class Order
    {
        public IList<OrderId> ProductIds { get; } = [];
    }