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

Changing Equal and NotEqual signature #275

Open
unional opened this issue Mar 24, 2023 · 0 comments
Open

Changing Equal and NotEqual signature #275

unional opened this issue Mar 24, 2023 · 0 comments

Comments

@unional
Copy link
Owner

unional commented Mar 24, 2023

Equal<A, B, T = A, E = never>
NotEqual<A, B, T = A, E = never>

Changing Equal<> is not a problem and is clear, as A and B are equal, returning either one is fine.

NotEqual<> is more problematic as It's ambiguous on which one to return.
Returning A per "convention" helps, but the logic is not clean.

There are probably use cases for this, as the filter variant is more generic than the predicate variant.

Will keep it as is for now, until there are sufficient use cases to support the change.

This will be a breaking change.

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

No branches or pull requests

1 participant