BlueMountainCapital/Deedle — pull request #52 by buybackoff (2013-11-04 00:45:42+00:00)
Title: IVector<> implementation with Solid.Vector (#51), changed ReadOnlyCollection<> to just simple IList<>, kind of dependency injection for different IVector<> implementation (VectorBuilder type) --all tests pass with SolidVector

I have implemented `IVector<>` with `Solid.Vector<>`. All tests pass. That was much easier and faster than I could have expected - the architecture of Deedle if cool! :)

(Current `Solid.Vector<>` master branch has a bug that I have fixed in the latest pull request https://github.com/GregRos/Solid/pull/1)

There are some other changes that I want to highlight:

**1.** Some time ago I suggested to change `IReadOnlyList<>` (.NET 4.5) to `ReadOnlyCollection<>` (.NET 2.0). It works as a concrete implementation, but for the type `VectorData<>` it is much better to have an interface. Given that we need both `Count` and `Item` properties and do not want to target 4.5, I believe `IList<>` is a good choice, because:

* Even though is mutable, it is used only inside the library.
* `IList<>` is a very common interface. `Solid.Vector<>` is an example when an immutable data structure implements `IList<>`
* Initial `IReadOnlyList<>` is the most suitable interface, but it targets .NET 4.5. `IReadOnlyList<>` or `ReadOnlyCollection<>` could be easily extended by some wrapper with mutation methods that throw. (much easier than re-targeting existing types to 4.5 and implementing `IReadOnlyList<>`)

**2.** New `VectorBuilder` in VectorExtensions.fs just exposes a static property `Instance : IVectorBuilder`. This property is set to concrete implementation (Array or Solid) and then used everywhere instead of `ArrayVectorBuilder`. It is a kind of poor man's dependency injection for the time being.

TODO: IIndex for similar use case, benchmarks, tests