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

Abstract modifier unnecessary for abstract methods #3898

Closed
gbracha opened this issue Jun 27, 2012 · 1 comment
Closed

Abstract modifier unnecessary for abstract methods #3898

gbracha opened this issue Jun 27, 2012 · 1 comment
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-enhancement A request for a change that isn't a bug
Milestone

Comments

@gbracha
Copy link
Contributor

gbracha commented Jun 27, 2012

An abstract method (or getter/setter) need not have an abstract modifier; the absence of a body unambiguously identifies it as abstract.

By making the abstract modifier optional or eliminating it entirely, one can encourage a pattern where abstract classes are used instead of interfaces with little syntactic penalty.

This is already in the 0.11 draft spec.

@gbracha
Copy link
Contributor Author

gbracha commented Jun 27, 2012

Analyzer issue #3899
VM issue #3900
dart2js issue #3901

This would be the first step on the path to eliminating interface declarations. Then, most interfaces can be replaced with abstract classes. At the same time, implement redirecting constructors, allowing the remaining interfaces to be converted. Then, support for the interface syntax can be removed.

@gbracha gbracha added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Jun 27, 2012
@gbracha gbracha self-assigned this Jun 27, 2012
@gbracha gbracha added this to the M1 milestone Jun 27, 2012
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants