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

Restore smartmatch overload hook #22612

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

Leont
Copy link
Contributor

@Leont Leont commented Sep 19, 2024

This was removed with the smartmatch removal, but I suspect it's better to silently leave it in for two reasons:

Firstly, I suspect that there are lots of classes that overload several operators. Them having to conditionally set one of their overloads complicates them without much benefit. Silently allowing them seems like the friendliest option. If they're truly reliant on it the tests will show it anyway.

Secondly, I am working on backwards compatability module, and that will require ~~ overloading one way or another. This would be easiest solution to that. The alternative would be to make the list of operators customizable, which may be good idea regardless of adding smartmatch back in.

This was removed with the smartmatch removal, but I suspect it's better to silently leave it in for two reasons:

Firstly, I suspect that there are lots of classes that overload several operators. Them having to conditionally set one of their overloads complicates them without much benefit. Silently allowing them seems like the friendliest option. If they're truly reliant on it the tests will show it anyway.

Secondly, I am working on backwards compatability module, and that will require ~~ overloading one way or another. This would be easiest solution to that. The alternative would be to make the list of operators customizable, which may be good idea regardless of adding smartmatch back in.
@thibaultduponchelle thibaultduponchelle merged commit 6ecaa33 into blead Sep 20, 2024
68 checks passed
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.

3 participants