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

Add Minima & Maxima to supersede MinBy & MaxBy #1018

Closed
atifaziz opened this issue Oct 23, 2023 · 0 comments · Fixed by #1019
Closed

Add Minima & Maxima to supersede MinBy & MaxBy #1018

atifaziz opened this issue Oct 23, 2023 · 0 comments · Fixed by #1019
Milestone

Comments

@atifaziz
Copy link
Member

PR #945 addressed most conflicts with .NET, but just two exceptions remain:

Does not address issues with MinBy/MaxBy per other discussions.

Let's consider adding Minima and Maxima, respectively. While it's going to be a never-ending chase to avoid conflicts with .NET, as more identically named methods may continue to land in future releases, it's worth making an exception for the only two remaining conflicting methods at this conjuncture to fully address #565 (for now).

Minima and Maxima seem like reasonable names since both operators return sequences so the plural forms of minimum and maximum seem appropriate. A By suffix seems unnecessary as using these methods on scalar values is expected to be super rare and so requiring a key selector won't be a surprise for or inconvenient to most.

MinBy and MaxBy should be marked obsolete and converted to regular static methods for .NET 6+ (as was done in #945).

@atifaziz atifaziz added this to the 4.0 milestone Oct 23, 2023
atifaziz added a commit that referenced this issue Oct 24, 2023
This is a squashed merge of PR #1019 that closes #1018.
julienasp pushed a commit to julienasp/MoreLINQ that referenced this issue Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant