Skip to content

Abstract modifier unnecessary for abstract methods #3898

Closed

Description

@gbracha

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.

Activity

  1. gbracha commented on Jun 27, 2012

    @gbracha
    ContributorAuthor

    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.

  2. self-assigned this
    on Jun 27, 2012
  3. added this to the M1 milestone on Jun 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions