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: undeprecate StringHeader, SliceHeader #53079

Closed
rsc opened this issue May 25, 2022 · 4 comments
Closed

reflect: undeprecate StringHeader, SliceHeader #53079

rsc opened this issue May 25, 2022 · 4 comments
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented May 25, 2022

CL https://go-review.googlesource.com/c/go/+/401434 marked these as deprecated, but if you want to do something like extract the pointer inside a string or a slice, it is unclear what you should use instead. We need to have an available answer before we ship a release with them deprecated.

See also #53003.

@rsc rsc added release-blocker NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels May 25, 2022
@bcmills
Copy link
Contributor

bcmills commented May 25, 2022

Within std we currently have the internal/unsafeheader package, which defines String and Slice structs, but they're only marginally safer and not very ergonomic either.

@dmitshur dmitshur added this to the Go1.19 milestone May 25, 2022
@dmitshur
Copy link
Contributor

CC @ianlancetaylor.

@rsc
Copy link
Contributor Author

rsc commented May 26, 2022

For Go 1.19 it definitely seems like we should roll back the deprecation CL.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/408815 mentions this issue: Revert "reflect: deprecate (Slice|String)Header"

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels May 26, 2022
@dmitshur dmitshur changed the title reflect: undeprecate StringHeader, SliceHeader? reflect: undeprecate StringHeader, SliceHeader May 26, 2022
@dmitshur dmitshur added the Documentation Issues describing a change to documentation. label May 26, 2022
@golang golang locked and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants