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

wiki: CodeReviewComments: change "named returns" to "naked returns" #29738

Closed
jalan opened this issue Jan 14, 2019 · 8 comments
Closed

wiki: CodeReviewComments: change "named returns" to "naked returns" #29738

jalan opened this issue Jan 14, 2019 · 8 comments

Comments

@jalan
Copy link

jalan commented Jan 14, 2019

What did you do?

I read CodeReviewComments#named-result-parameters.

What did you expect to see?

"Corollary: it's not worth it to name result parameters just because it enables you to use naked returns."

What did you see instead?

"Corollary: it's not worth it to name result parameters just because it enables you to use named returns."

It should say "naked returns" here, right? Easy fix to make, just posting here to respect the rules. "Please discuss changes before editing this page, even minor ones." 😃

@mvdan
Copy link
Member

mvdan commented Jan 14, 2019

Sounds to me like it's a human error, yes. Would like another pair of eyes on this to be sure I'm not missing anything - cc @dmitshur @bradfitz.

@ianlancetaylor
Copy link
Contributor

I agree that it should be "naked returns". Go ahead and change it. Thanks.

(It's odd because the original source for that comment is a Google-internal doc, and in that doc it says "naked returns.")

@dominikh
Copy link
Member

commit baec72a245ccc8350a5703497156484f5652b848
Author: luantao <bibicut@vip.qq.com>
Date:   Thu Jul 5 22:45:33 2018 +0800

    I think this place is wrong.

diff --git a/CodeReviewComments.md b/CodeReviewComments.md
index 32eed16..64b4100 100644
--- a/CodeReviewComments.md
+++ b/CodeReviewComments.md
@@ -458,7 +458,7 @@ func (f *Foo) Location() (lat, long float64, err error)
 
 Naked returns are okay if the function is a handful of lines. Once it's a medium
 sized function, be explicit with your return values. Corollary: it's not worth it
-to name result parameters just because it enables you to use naked returns.
+to name result parameters just because it enables you to use named returns.
 Clarity of docs is always more important than saving a line or two in your function.
 
 Finally, in some cases you need to name a result parameter in order to change

@ianlancetaylor
Copy link
Contributor

I really really wish there were some way to get notified on each change to the wiki.

@dominikh
Copy link
Member

@dmitshur ^ tool idea for you.

@jalan
Copy link
Author

jalan commented Jan 15, 2019

Fixed.

The GitHub wiki editing experience leaves something to be desired. I intended to write a proper commit message including a link to this issue, but when I pressed return to give myself some empty lines, it saved the page. Sorry about that.

@jalan jalan closed this as completed Jan 15, 2019
@dmitshur
Copy link
Contributor

dmitshur commented Jan 17, 2019

I really really wish there were some way to get notified on each change to the wiki.

@ianlancetaylor How would you like to be able to receive notifications? Each change to all pages, or only particular pages?

@ianlancetaylor
Copy link
Contributor

@dmitshur I personally would like to see each change to all pages, just as I see each change to the any portion of the source code.

@golang golang locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants