On Friday, 27 August 2021 at 10:34:27 UTC, Kirill wrote:
Each csv file will be different.

For example:
```
name;surname;age;grade
Alex;Wong;18;87
John;Doe;19;65
Alice;Doe;18;73
etc...
```

I'd like to extract the data types automatically. For instance, if using tuples:
```
Tuple!(string, string, int, int) ...
```
instead I'd like to have:
```
auto mytuple = read_csv(path); // returns Tuple!(string, string, int, int)[]
```

mytuple needs to have a type that's known at compile-time, so this isn't possible. In the types are only dynamically known, then you have to deal in dynamic types. One way could be to have a read_csv that returns an array of https://dlang.org/phobos/std_variant.html

Reply via email to