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

golang.org/x/exp/slices: inconsistent naming #51698

Closed
frioux opened this issue Mar 16, 2022 · 6 comments
Closed

golang.org/x/exp/slices: inconsistent naming #51698

frioux opened this issue Mar 16, 2022 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@frioux
Copy link

frioux commented Mar 16, 2022

Most of the functions use E for the names of the elements within slices, but a few use Elem. The former strikes me as more Go, but I don't care. Just struck me as inconsistent.

@heschi heschi added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 16, 2022
@heschi
Copy link
Contributor

heschi commented Mar 16, 2022

cc @ianlancetaylor

@heschi heschi added this to the Unreleased milestone Mar 16, 2022
@ianlancetaylor
Copy link
Contributor

The only function I see that uses Elem is offByOne in slices_test.go. I'll change that one, but did I miss any?

@ianlancetaylor
Copy link
Contributor

Oh, I see, the sort functions. Got it.

@gopherbot
Copy link

Change https://go.dev/cl/393378 mentions this issue: slices: consistently use E rather than Elem

gopherbot pushed a commit to golang/exp that referenced this issue Mar 17, 2022
This doesn't change the generated file, that will come later.

For golang/go#51698

Change-Id: I3ee637dc1ec94f0c23de21fa0a4a398d31a5b70e
Reviewed-on: https://go-review.googlesource.com/c/exp/+/393378
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eli Bendersky‎ <eliben@golang.org>
@gopherbot
Copy link

Change https://go.dev/cl/393700 mentions this issue: sort: generate generic variants with E rather than Elem

gopherbot pushed a commit that referenced this issue Mar 18, 2022
For #51698

Change-Id: Ifc5bef2cc41b163644ac80ace7c1470c8a130467
Reviewed-on: https://go-review.googlesource.com/c/go/+/393700
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eli Bendersky‎ <eliben@golang.org>
@ianlancetaylor
Copy link
Contributor

The fix here was completed by https://go.dev/cl/399315.

@golang golang locked and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants