csvReader: how to read only selected columns while the class Layout has extra field?
mw
mingwu at gmail.com
Sun Oct 2 21:18:43 UTC 2022
On Sunday, 2 October 2022 at 21:03:40 UTC, rassoc wrote:
> But say, I'm curious, what's the purpose of adding an
> optional/useless contents field? What's the use-case here?
We have a class/struct for a data record,
some of its data fields need to be saved/loaded from CSV files;
while there are other helper fields which are useful for various
computation tasks (e.g. caching some intermediate computation
results), these fields do not need to be saved/loaded from the
csv files.
A CSV library should consider all the use cases, and allow users
to ignore certain fields.
More information about the Digitalmars-d-learn
mailing list