I am developing a a project in .NET, part of which I will be manipulating times series.
Since the main part of the project has been implemented in C#, I've sketched an object-oriented design inheriting from SortedDictionary<DateTime,T>
.
However, I've been in love with functional programming for the last few years, and I figured that since this component will be subject to pretty wild and intense algorithms, I would be willing to process it in parallel, and I would enjoy having an immutable structure.
I thought about designing it in F# using defining a type as follows:
type TimeSeries<'t> = (DateTime * 't) seq
and going on with it.
It would have the advantage of being immutable, and the execution in parallel would be pretty straightforward using F#'s Async
module. I could also use the unit of measure feature of F#.
I am just a bit scared of having to use the results of the computations in C#, and I wondered if someone who's tried already could give me some feedback about the result in practice.
Was it easy to use in the end or was it too complicated to switch from C# to F#?
Isn't the fact that the collection is immutable an efficiency problem when the time series get larger?
Will I be able to keep the type generic when I will try to divide elements, or will I have to switch to TimeSeries<float>
pretty quickly with my functions?
If I want to use C# based algorithm on the time series for some features, will that make this whole idea useless?
Have you got some reference of research done on the efficiency of functional implementation of time series?