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

[Proposal]: Collection expressions #8652

Open
CyrusNajmabadi opened this issue Nov 19, 2024 · 0 comments
Open

[Proposal]: Collection expressions #8652

CyrusNajmabadi opened this issue Nov 19, 2024 · 0 comments
Assignees
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion
Milestone

Comments

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Nov 19, 2024

Collection expressions

Summary

Collection expressions introduce a new terse syntax, [e1, e2, e3, etc], to create common collection values. Inlining other collections into these values is possible using a spread operator .. like so: [e1, ..c2, e2, ..c2].

Design meetings

See also:

Working group meetings

  • Oct 6, 2022: Initial goals, dictionaries
  • Oct 14, 2022: Dictionaries, efficiency
  • Oct 21, 2022: Spans and stack allocation, review
  • Apr 5, 2023: Efficient construction for array-backed collections
  • Apr 28, 2023: Natural type, spread type inference, dictionary add vs overwrite
  • May 26, 2023: Construction API calls, dictionary sigils, C# 12 cut line
  • Jun 12, 2023: API shape for BCL collections to participate
  • Jun 26, 2023: Lifetimes, BCL APIs, breaking changes, extension methods, syntax disambiguation
  • Jul 26, 2023: Create methods with derived type, extension GetEnumerator, synthesized inline arrays
  • Aug 3, 2023: Escape scope, blittable data
  • Aug 10, 2023: Behavior on runtimes without inline arrays
  • Aug 11, 2023: Concrete types used when targeting interface types
  • Jan 23, 2024: Design restart
@CyrusNajmabadi CyrusNajmabadi self-assigned this Nov 19, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the 12.0 milestone Nov 19, 2024
@dotnet dotnet locked and limited conversation to collaborators Nov 19, 2024
@jnm2 jnm2 self-assigned this Nov 23, 2024
@333fred 333fred added the Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification label Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion
Projects
None yet
Development

No branches or pull requests

3 participants