https://issues.dlang.org/show_bug.cgi?id=17109
--- Comment #4 from Jack Stouffer <[email protected]> --- (In reply to Sophie from comment #3) > It's a missing value, but in the case of numeric types a missing value is > simply one example of a malformed value. I think the better approach in the > code you used as an example would be to not expect the CSV logic to handle > malformed floats. Use the CSV parser to extract strings, and then your code > should assume responsibility for validating and handling malformed inputs. The problem is, if I just get strings, then std.csv is useless because I can just do this auto input = File("file.csv"); auto data = input.byLine.map!(a => splitter(a, ',')); It would be faster too, as I'm just getting slices over byLine's buffer rather than creating a new Tuple. But, returning T.init probably is a wrong choice because int.init == 0. Perhaps the replacement logic can be confined to nullable types and types with nan? --
