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

spec: a small imperfection in spec #41612

Closed
yaxinlx opened this issue Sep 24, 2020 · 2 comments
Closed

spec: a small imperfection in spec #41612

yaxinlx opened this issue Sep 24, 2020 · 2 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@yaxinlx
Copy link

yaxinlx commented Sep 24, 2020

There is one line in spec:

x == y+1 && <-chanPtr > 0

The name chanPtr looks not very nature. Is chanInt better?

@yaxinlx yaxinlx changed the title spec: spec: a small imperfection in spec Sep 24, 2020
@ianlancetaylor
Copy link
Contributor

Thanks for noticing. I was able to trace that line all the way back to March 2008 in revision https://go.googlesource.com/go/+/73823d236a063e9e1fd326c07797be3a08b79edb . Back then I think chan_ptr (as this line was written back then) indicated a pointer to a channel, as at that time channels were always written as pointer types (as in *chan int).

I agree that today chanInt would make more sense here.

CC @griesemer

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 24, 2020
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Sep 24, 2020
@gopherbot
Copy link

Change https://golang.org/cl/257159 mentions this issue: spec: better variable name for operator example

@golang golang locked and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants