-
Notifications
You must be signed in to change notification settings - Fork 66
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
Avoid inheritance in double dispatch #710
Comments
Small comment. I assume it would return |
Unclear whether we should return the base super type Regarding |
By guarding our methods and generics with
inherits_only()
:This means that we force subclasses to write common type methods with their superclasses, but in return we gain type stability. If we allow inheritance we get:
We should try and offer a better common type mechanism in the long term, but this approach would at least make things more predictable in the short term.
The text was updated successfully, but these errors were encountered: