Microsoft.FSharp.Collections vs System.Collections.Immutable
.net, collections, f#, immutability
Solution
The reason for this duplication is simply that `System.Collections.Immutable` is a recent addition and is intended for use in C#, so its designers understandably didn't want people to have to reference `FSharp.Core.dll`.
As for choosing between the two, I would use `System.Collections.Immutable` in C# code and in F# code that is intended to be used from C#, and `Microsoft.FSharp.Collections` in all other F# code. AFAIK there is no significant difference in terms of performance. Typical code will look like chained method calls with S.C.I and series of `|>` calls with M.F.C but this is just a syntactic difference really -- conceptually it's the same thing.
Problem
I recentry found out that there's a bunch of immutable collections in .Net F# is a language with focus on immutability and it has its own immutable data types. Interestingly, I saw no reference to abovementioned immutable collections in any reading on F#. I am wondering is there any relationship between those immutable collections and F# collections? Is there any guideline what to use? What is better, F# `Map<_,_>` or `ImmutableDictionary(TKey, TValue)` and so on? UPDATE Maybe I could ask it as follows: does anybody have any experience using both these libraries in same project or have compared their productivity? Or it's just like that - first are for C# and latter are for F# and that's it?