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

Mixins with super-calls. #6

Closed
lrhn opened this issue Jul 18, 2018 · 1 comment
Closed

Mixins with super-calls. #6

lrhn opened this issue Jul 18, 2018 · 1 comment
Labels
request Requests to resolve a particular developer problem

Comments

@lrhn
Copy link
Member

lrhn commented Jul 18, 2018

It's sometimes useful to have a mixin which can do super-invocations.
This was allowed in Dart 1. That implementation is still being used by Flutter code because they are using the feature. We should add the feature to the language again, so we can move the Flutter code off the old implementation.

The reason the Dart 1 specification of "super mixins" was removed again was that it didn't work well in a more strongly typed language (it made all super-invocations effectively dynamic invocations) and it was never implemented by dart2js. It also did not meet the use-cases that were actually being addressed, for example it was only possible to give one super-type.

The alternative we introduce should address the current need, and we should introduce a syntax which allows more mixin features to be added in the future. For that reason it must not use a class declaration like in Dart 1. It was impossible to see whether a class declaration was intended to be a class, or just intended to be a mixin. We have reserved the mixin identifier as a built-in identifier in Dart 2.

Solutions: #7.

@lrhn lrhn added the request Requests to resolve a particular developer problem label Jul 18, 2018
@mit-mit
Copy link
Member

mit-mit commented Oct 17, 2018

Closing, now tracked in implementation issue #12

@mit-mit mit-mit closed this as completed Oct 17, 2018
mit-mit pushed a commit that referenced this issue May 12, 2019
Update feature-specification.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Requests to resolve a particular developer problem
Projects
None yet
Development

No branches or pull requests

2 participants