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

any over interface{} #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrwormhole
Copy link

@mrwormhole mrwormhole commented Apr 21, 2023

the aim of this PR is to remove support for versions below 1.18 and complete existing TODO which encourages the use of any over interface{}

also Diff and Equal methods in compare.go are the most commonly used functions but due to confusion of "x" and "y", it causes new developers to write want and got in reverse, so I have renamed both Diff and Equal function signatures from

see if this makes sense @neild @dsnet

@mrwormhole mrwormhole changed the title any over interface{} and replacement of X,Y any over interface{} and replacement of X,Y for common public funcs Apr 21, 2023
@dsnet
Copy link
Collaborator

dsnet commented Apr 21, 2023

I'm a 👎 to renaming got and want. See my comment here: #328 (comment)

I'm a 👍 for only supporting higher versions of Go and using any over interface{} if @neild is okay with it. In the past, Google needed older versions internally for a long time. I no longer work at Google, and so I'm perfectly happy support only the latest 2 versions.

@neild
Copy link
Collaborator

neild commented Apr 21, 2023

I'd rather wait until the x/ repos update to supporting only 1.18 before doing so here. (They're currently still on 1.17, although 1.17 is out of the supported window so they should be able to update at any time now.)

@mrwormhole
Copy link
Author

ok I will rollback this to include only interface{} to any changes. It seems like a rabbit hole discussion about want/got so I will just follow the docs example. I left a comment to the issue why I think there are inconsistencies about which to put first (want,got) or (got, want). Then I will possibly wait for x repos

@mrwormhole mrwormhole changed the title any over interface{} and replacement of X,Y for common public funcs any over interface{} Apr 23, 2023
@mrwormhole mrwormhole force-pushed the any-over-empty-interface branch 3 times, most recently from 7780022 to 2bac0d9 Compare September 18, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants