Skip to content
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

[stdlib] Tweak comments #693

Closed
wants to merge 1 commit into from

Conversation

PatrickPijnappel
Copy link
Contributor

Slight amendment to #613 to, among others, replace a // Return comment with something a bit more useful :).

@@ -80,7 +80,7 @@ internal func _parseAsciiAsUIntMax(
else { return nil }
// Disallow < 0.
if hasMinus && result != 0 { return nil }
// Return.
// Valid result, return.
return result
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO all of these return comments are vacuous and should be deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dabrahams I can definitely see where you're coming from but let me explain myself :).

Rationale
The comments headings are intended for code grouping (instead of newlines) so you can quickly skim the algorithm and it's structure/flow just from those headings. The return here doesn't belong to the // Disallow < 0 code. You could separate them with a newline, but a comment is a bit more consistent with the rest of the method, and while skimming the headings conveys the fact that we early-returned all invalid results.

@lattner
Copy link
Contributor

lattner commented Dec 26, 2015

I agree with DaveA here, I'd prefer that these vacuous comments just be removed.

@lattner lattner closed this Dec 26, 2015
@PatrickPijnappel PatrickPijnappel deleted the patch-3 branch December 26, 2015 00:15
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
Pass the default process timeout from the main process to the subprocesses that build the projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants