dotNext icon indicating copy to clipboard operation
dotNext copied to clipboard

Potential addition of an `OrderedDictionary<TKey, TValue>` type

Open alexrp opened this issue 1 year ago • 6 comments

Context: https://github.com/dotnet/runtime/issues/24826 (especially the last 10 or so comments)

Do you think it would make sense for .NEXT to include @TylerBrinkley's OrderedDictionary<TKey, TValue> implementation in DotNext.Collections? (Assuming Tyler takes no issue with this, of course.) It seems like there's high demand for this type but low appetite for prioritizing it from the .NET team, and it's only currently available in an unmaintained, pre-release, and deprecated package.

alexrp avatar Jan 30 '24 20:01 alexrp

It's MIT licensed so please do with it what you will. Personally, outside of including it in the BCL I think it would probably be used more in a more collection focused library. I think more people would be able to discover its existence and would be more willing to take a dependency on it than a more general purpose library like this. -Edit (After re-reading this I guess I really like the word "more" 😄)

TylerBrinkley avatar Jan 30 '24 20:01 TylerBrinkley

I think more people would be able to discover its existence and would be more willing to take a dependency on it than a more general purpose library like this.

The only general purpose collections library that immediately comes to mind here is C5, but that seems to be unmaintained these days... :thinking:

One could also imagine a DotNext.Collections package, but at that point I might be asking too much of @sakno. :eyes:

alexrp avatar Jan 30 '24 21:01 alexrp

On the one hand, I never tried to reach the goal to incorporate reusable data structures to .NEXT such as trees, collections, etc. From the other side, the library has specialized collections such as typed maps, concurrent cache, etc. Also, there is very similar discussion and proposal: #163. And it was rejected.

sakno avatar Jan 30 '24 21:01 sakno

If you don't think it belongs in .NEXT, that's totally fine. This was just the first possibility that came to mind while trying to think of a potential home for it.

alexrp avatar Jan 31 '24 01:01 alexrp

Let's keep this issue open for now. I don't want to be a sole decision maker, .NEXT is an open-source project and community opinion matters.

sakno avatar Jan 31 '24 08:01 sakno

Still has to go through API review, but I think it's safe to say that this won't be needed after all: https://github.com/dotnet/runtime/issues/24826#issuecomment-2047792174

alexrp avatar Apr 10 '24 15:04 alexrp

Finally OrderedDictionary is announced in .NET 9. Closing issue.

sakno avatar Jul 28 '24 11:07 sakno