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
sync/atomic: some words are redundant in package doc. #22974
Comments
It's not redundant, as the Go language rules make it harder than you think to subtract a signed positive constant value. To subtract a variable value, you can simply write Closing because I don't think we should change this. |
How is it possible to call [edit] sorry, no errors are reported. Surprise! |
btw, there are many |
@ianlancetaylor I still think Example
|
Oh yeah, I found another way to subtract unsigned constant, if the unsigned constant is typed and its type is same as the second parameter type.
But if the type of the typed unsigned constant doesn't match he second parameter type, then the |
but the doc says |
Thanks for the comments. Let's agree to disagree. |
but the docs really doesn't mention how to subtract an unsigned constant. |
Go doesn't really have the concept of an unsigned constant. Go constants are untyped. Numeric constants are positive or negative. They are always signed. See https://golang.org/blog/constants. |
The doc for the function AddUint32:
I think here,
signed positive constant value
should be replaced withpositive value
.constant
andsigned
are redundant.Same problems for other AddUxxxxx functions.
The text was updated successfully, but these errors were encountered: