Reminder: Two days left to review Jesse Phillips' CSV Parser

Jonathan M Davis jmdavisProg at gmx.com
Thu Nov 10 10:05:05 PST 2011


On Thursday, November 10, 2011 06:04 Jonas Drewsen wrote:
> On 10/11/11 02.02, dsimcha wrote:
> > As a reminder, the review of Jesse Phillips' CSV parser ends at the end
> > of Friday and will be followed by one week of voting. Please speak up
> > now about any remaining issues.
> 
> I've not have a look at the code itself yet. But a couple of comments
> about the API:
> 
> auto csvReader(Contents = string, Range, Heading, Separator =
> char)(Range input, Heading heading, Separator delimiter = ',', Separator
> quote = '"');
> 
> 1, I was under the impression that declaring the return value as auto
> for std library is not good because it does not document what the return
> value actually is. Or maybe it is good enough that it is mentioned in
> the comments under "Returns: ..."?

Then go look at std.algorithm. It returns auto all over the place. That's 
usually what you do when returning a new range type. The documentation then 
says that it's returning a range. And that's essentially what the docs do in 
this case. It would be horrible to have to give the return type for many 
functions that return ranges. They're frequently hideous templates that would 
just scare people (which is how std.algorithm's documentation used to look). 
All you need to know is that it's a range, not what the exact type is.

- Jonathan M Davis


More information about the Digitalmars-d mailing list