Reminder: Two days left to review Jesse Phillips' CSV Parser
Jonas Drewsen
jdrewsen at nospam.com
Thu Nov 10 06:04:47 PST 2011
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: ..."?
2, The requirement for passing "cast(string[]) null" as the heading
parameter to signal that heading is there but should be ignored seems a
bit awkward.
Maybe an overload for csvReader where you remove the constraints:
isForwardRange!Heading && isSomeString!(ElementType!Heading) and set
is(Heading:void*) instead. And in there just call the normal csvReader
with cast(string[])null.
Btw. if any of this has already been brought up then sorry about that.
/Jonas
More information about the Digitalmars-d
mailing list