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

reflect: add Pointer #47651

Closed
bradfitz opened this issue Aug 11, 2021 · 9 comments
Closed

reflect: add Pointer #47651

bradfitz opened this issue Aug 11, 2021 · 9 comments

Comments

@bradfitz
Copy link
Contributor

Per chat elsewhere, reflect.Ptr is weird and doesn't match reflect.UnsafePointer or unsafe.Pointer.

Proposal: add reflect.Pointer matching reflect.Ptr.

Likewise reflect.PtrTo -> reflect.PointerTo probably.

@gopherbot gopherbot added this to the Proposal milestone Aug 11, 2021
@gopherbot
Copy link

Change https://golang.org/cl/341333 mentions this issue: refect: rename Ptr Kind to Pointer (but keep Ptr)

@rsc
Copy link
Contributor

rsc commented Aug 11, 2021

Seems reasonable to me.

@rsc rsc added this to Active in Proposals (old) Aug 11, 2021
@rsc rsc moved this from Active to Incoming in Proposals (old) Aug 11, 2021
@robpike
Copy link
Contributor

robpike commented Aug 11, 2021

So you just want Pointer to point to Ptr?

@bradfitz
Copy link
Contributor Author

@robpike, actually @rsc pointed out that he wanted it the other way: Ptr to point to Pointer. 😄

@earthboundkid
Copy link
Contributor

FWIW, I was writing some reflect code a month or two back and had trouble remembering if I wanted Ptr or Pointer.

@rsc
Copy link
Contributor

rsc commented Aug 18, 2021

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Incoming to Active in Proposals (old) Aug 18, 2021
@rsc rsc moved this from Active to Likely Accept in Proposals (old) Aug 25, 2021
@rsc
Copy link
Contributor

rsc commented Aug 25, 2021

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc rsc moved this from Likely Accept to Accepted in Proposals (old) Sep 1, 2021
@rsc
Copy link
Contributor

rsc commented Sep 1, 2021

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: reflect: add Pointer reflect: add Pointer Sep 1, 2021
@rsc rsc modified the milestones: Proposal, Backlog Sep 1, 2021
@gopherbot
Copy link

Change https://golang.org/cl/358454 mentions this issue: all: use reflect.{Ptr,PtrTo}

gopherbot pushed a commit that referenced this issue Oct 26, 2021
Updates #47651
Updates #48665

Change-Id: I69a87b45a5cad7a07fbd855040cd9935cf874554
Reviewed-on: https://go-review.googlesource.com/c/go/+/358454
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

5 participants