Comment by ykonstant Comment by ykonstant 18 hours ago 2 replies Copy Link View on Hacker News I don't understand; what is your suggested solution?
Copy Link mrkeen 17 hours ago Next Collapse Comment - I'm not smart enough to suggest a fix here, I'm just pointing out that this article is not the PdV from the well known article.But I can spot when code is doing exactly what the cited article says not to do,This line is the "validate" in the expression "parse, don't validate": if (theEmail.error != PARSE_OK) You might like it, but that's not my business. Maybe this C article should have been "parse, then validate".You'd be better off reading the original: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va... Reply View | 0 replies
Copy Link teo_zero 16 hours ago Prev Collapse Comment - parseEmail() should either return a valid email, or not return at all; whether that means panic, exit, or jump to an error handler... is left to the implementer Reply View | 0 replies
I'm not smart enough to suggest a fix here, I'm just pointing out that this article is not the PdV from the well known article.
But I can spot when code is doing exactly what the cited article says not to do,
This line is the "validate" in the expression "parse, don't validate":
You might like it, but that's not my business. Maybe this C article should have been "parse, then validate".You'd be better off reading the original: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...