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

affected/package: documentation #53771

Closed
mneverov opened this issue Jul 10, 2022 · 4 comments
Closed

affected/package: documentation #53771

mneverov opened this issue Jul 10, 2022 · 4 comments

Comments

@mneverov
Copy link

mneverov commented Jul 10, 2022

Please remove Don't be clever advice from the memory model.

The statement is annoying. I think there is no other language that has such advice in their specification.
Does this advice apply to go core team too?

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2022
@mneverov
Copy link
Author

@rsc let's plan it, reopen the issue and fix the docs

@ianlancetaylor
Copy link
Contributor

We stand by the statement. Go is an opinionated language and that is our opinion.

@mneverov
Copy link
Author

@ianlancetaylor,
sorry, but i still don't get why you discourage everyone from reading the documentation.
If the advice denotes a part of the language that not every developer should know then let's be consistent and add the advice to every part of the spec. beyond syntax explanation. Surely, GC is one of these "advanced" topics but there is no advice there.

Let me try to explain how I read the advice:

We, the best developers in the world, already took care about go memory model, so you, not so smart developer, can implement your stupid tiny web services without understanding how it works.

Currently, every web service uses prometheus for metrics, which atomics. Unfortunately, there is indeed no reason to read the specification since there is nothing about atomics.

Is it possible to change the sentence from "don't be clever" to "act on your own risk" or something like that?

@ianlancetaylor
Copy link
Contributor

We may disagree on what the memory model document says. When I look at it, the memory model does not tell people not to read the documentation. It tells people to not write programs to rely on the details of the memory model. We're not discouraging people from reading and understanding it.

Thanks for pointing out that #5045 was still open. It was fixed back in January and when the 1.19 release comes out, fairly soon, that fix will be visible on at https://go.dev/ref/mem. I closed #5045.

@golang golang locked and limited conversation to collaborators Jul 18, 2023
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

4 participants