Skip to content

Simplify collections, and produce less pooling work #79153

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner June 26, 2025 17:26
@@ -69,7 +69,7 @@ public static ImmutableArray<T> ToImmutableArrayOrEmpty<T>(this IEnumerable<T>?
{
if (items == null)
{
return ImmutableArray.Create<T>();
return [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I don't normally mind the change, if this is a source package does this create a problem for any of our consumers that aren't on a new enough compiler?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collection expressions were C# 12. we're already about to ship 14. I would expect at most we would want people on N-1. Not arbitrarily far back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants