-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
There's an article at the top of Hacker News right now,
https://blog.minio.io/golang-internals-part-2-nice-benefits-of-named-return-values-1e95305c8687
https://news.ycombinator.com/item?id=14668323
... which advocates for naming return values for the benefit of better generated code.
It concludes:
So we will be gradually adopting named return values more and more, both for new code as well as for existing code.
In fact we are also investigating if we can develop a little utility to help or automate this process.
This is totally counter to:
https://golang.org/s/style#named-result-parameters
... which says that naming result parameters should only be for godoc cleanliness.
We should fix the compiler to generate the same code regardless.
ericlagergren, ObviouslyGreen, ahaysx, shawnps, hooluupog and 99 moredmitshur, theckman, djhworld, solher, elwinar and 11 more
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Triage Backlog