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
Assignees
Milestone

Comments

@yaxinlx
Copy link

@yaxinlx 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

@ianlancetaylor ianlancetaylor commented Sep 24, 2020

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

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 24, 2020

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

@gopherbot gopherbot closed this in 23cc16c Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.