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

proposal: sort: rename sort.Interface to sort.Sortable? #30795

Closed
muni-corn opened this issue Mar 13, 2019 · 3 comments
Closed

proposal: sort: rename sort.Interface to sort.Sortable? #30795

muni-corn opened this issue Mar 13, 2019 · 3 comments
Labels
FrozenDueToAge Proposal v2 A language change or incompatible library change
Milestone

Comments

@muni-corn
Copy link

muni-corn commented Mar 13, 2019

What version of Go are you using (go version)?

go version go1.12 linux/amd64

Just an idea: I figured that renaming sort.Interface to sort.Sortable would make a lot more sense, at least to me. I thought it's confusing as it is as I originally thought the documentation referred to a reflect.Interface instead of sort's own Interface type.

@agnivade
Copy link
Contributor

I think the breakage of the code is not worth the benefit it brings. For Go2, we usually consider breaking changes when the benefit overweighs the cost it extracts.

@agnivade agnivade changed the title Rename sort.Interface to sort.Sortable? proposal: sort: rename sort.Interface to sort.Sortable? Mar 13, 2019
@gopherbot gopherbot added this to the Proposal milestone Mar 13, 2019
@agnivade agnivade added the v2 A language change or incompatible library change label Mar 13, 2019
@muni-corn
Copy link
Author

Yeah, makes sense to me. :) Do you see any downsides to adding

type Sortable Interface

to the package?

@beoran
Copy link

beoran commented Mar 13, 2019

You can do this yourself, if you use type Sortable = sort.Interface in your own projects.

@golang golang locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Proposal v2 A language change or incompatible library change
Projects
None yet
Development

No branches or pull requests

4 participants