Hello again,
As previously mentioned, I'm trying to build an extensible and data type agnostic extension to the CSV functionality and I have the following questions and ideas and things I've tried:
1) Can a primitive type be assigned to Data? I want to pass an array of primitives (the new column or row) but that array could be either ints or decs and I don't know which at compile time. So how do I set up the function signature?
2) I thought the problem solved by the ADT library, like this: "void add(store Data item)" - this is from adt.List. However, it doesn't compile when I try to use store.
3) Do I wrap primitive types in Data? Like String?
4) Do I provide a bunch of the functions for different primitive data types?
5) Do I do it with optional parameters and set only the one I'm interested in?
6) Do I serialise Data and then deserialise it based on a Type provided in the function?
I went with the idea of wrapping primitive data types in Data, however, this causes another issue with assignment between variables with different sizes. I'll create a separate post for this issue.
Again, I'm open to suggestions!
Many thanks,
Sava
