-
-
Notifications
You must be signed in to change notification settings - Fork 743
Issue 8908 - Collapse of std.csv by the specifications change of std.conv.parse #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changed |
@JesseKPhillips , can you review this? |
@@ -2746,7 +2746,7 @@ unittest | |||
} | |||
|
|||
//Used internally by parse Array/AA, to remove ascii whites | |||
private void skipWS(R)(ref R r) | |||
package void skipWS(R)(ref R r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not this function make public? Or there should be a substitute function.
It is foreseen that similar much code appears for any program that is not Phobos as having faced it in std.csv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think skipWS
is not generic enough to make public.
Two months ago, @monarchdodra proposed a utility function skipWhite
in #827, but it is now closed.
And, the most major reason is: this is a regression fix, not a feature proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had closed #827 because it wasn't really even sure if or if not skipWhite
was desired, or if it had too much duplicate behavior, or where we'd even put it. I closed it because I wasn't passionate on the issue, nor did anybody else. If there is a request for it, I can re-open no problem.
There is a "major" difference between skipWS
and skipWhite
:
skipWS
is an internal parser function, and will only parse through legal source code whites (aka: ASCII white).
skipWhite
, on the other hand, is a end user function, so will parse through all forms of white.
We'd have to discuss which of the two (or both) we'd want to expose publicly, and where, while making sure the intended purpose is correctly understood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it package for now and defer the decision of the best public API to later.
@9rnsr, thanks for notifying me. I'll take a deeper look later, but these changes look appropriate for addressing the issue. |
@9rnsr, This addresses all conversions, but is missing a unittest for providing a header and structure. My suggestion:
Thank you. |
merged, I assume @JesseKPhillips is okay with everything |
You didn't actually merge anything? |
Issue 8908 - Collapse of std.csv by the specifications change of std.conv.parse
oops |
@andralex sorry if it wasn't clear enough that a merge would be ok. I'll be more explicit in the future. |
http://d.puremagic.com/issues/show_bug.cgi?id=8908