-
Notifications
You must be signed in to change notification settings - Fork 240
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
Inheritance #117
Comments
What should syntax for multiple inheritance look like? |
Good question! I would like to explore if we can avoid multiple inheritance and instead express interfaces/protocols/traits using a separate mechanism. :^) |
I know it's very very early but I hope to see soon some proper light RFCs so some thought goes into these and a public roadmap. Very interested how this will evolve. |
Great input! |
Dart uses mixins, a concept which lets you add features to a class without using multiple inheritance like explained in this article. If you are allowing inheritance, please consider adding super calls in the constructor and avoid having to call the super constructor explicitly, as was just announced in Dart 2.17 :) |
Classes and structs should be allowed to inherit from other classes and structs respectively.
Note that a
struct
can't inherit from aclass
and vice versa, as that would break the reference counting ownership model.The text was updated successfully, but these errors were encountered: