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
doc: add guidance on new vs. literal usage #14255
Comments
Or something at https://golang.org/s/style |
Probably belongs in the style wiki page. |
@adg I could add this to the style wiki, if you are ok with the suggestions itself. Then we can close this issue. |
ok @adg It started a poll instead https://groups.google.com/forum/?fromgroups&nomobile=true#!topic/golang-nuts/OltVvy8T_ZM to get more feedback. |
@davecheney that blog post doesn't mention I would not advise someone to switch from |
One thing I observed with new gophers, is having trouble judging is when to use
new
and when to take the address of struct literal.Adding a bit of guidance in the wiki or effective_go.html would be quite useful.
Suggestion for guidance:
The text was updated successfully, but these errors were encountered: