-
Notifications
You must be signed in to change notification settings - Fork 1k
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
NuGet package for Range and Index #3126
Comments
Microsoft.Bcl.AsyncInterfaces already provides similar functionality for a different feature new for C# 8. |
Pattern-based index and range expressions are added near the ship time of C# 8. Without this feature, out-of-band package cannot be actually used, since existing types have no member accepting them. But with this feature, it can be easily used. |
@huoyaoyuan it is fine, that I can't use it on core types. Problem is: without a package I can't implement indexers with them in my types in a .NET Standard 2.0 assembly. |
@jkotas should this issue be in dotnet/runtime instead? I'd love |
This is duplicate of dotnet/runtime#28285 |
Closing as a duplicate. |
So C# 8 is released, and .NET Framework support EoL is 2029, so I am targeting .NET Standard 2.0 for most old and new libraries alike. Which also means I can't really use ranges or the new indexing because
In the previous conversation about that topic it was mentioned, that
System.ValueTuple
NuGet support put an undue burden on the team and bloated the dependency list of many packages.Well, I love the System.ValueTuple package. And I can assure you to a great length, that I would love Range and Index even more, because it is rarely that extreme performance is needed, but every day I'd take clean code over a mess of method calls with off-by-one errors.
So I urge you to reconsider the lack of a similar package. At the very least, put the types themselves there (which, BTW, would be 100% compatible with further additions, if you wish to add extra members supporting them to the rest of the framework). At least it would be possible to implement indexing for our own collections.
Previous issue for the reference (it deviated too far from the topic): #2148
The text was updated successfully, but these errors were encountered: