Skip to content

Tech debt: ModelElement.features may be confused with FeatureSetΒ #2597

Open
@srawlins

Description

@srawlins

FeatureSet is the new analyzer (or Dart language) concept for enabled language features. As such, it may be a good idea to rename the features field (and related fields) on ModelElement.

This isn't a huge issue alone (there are plenty of other naming collisions about), but I was thinking of introducing a new class for ModelElement "features" which would encapsulate Strings (typically from keywords, like final, covariant, or from other situations, like inherited, read-only, etc.) and annotations (@protected, etc.). Going down the path of creating a class, like Feature or ElementFeature, etc, is now increasing the collision with FeatureSet.

So, what might be a new name? "Property" is already used for fields, so maybe "Attribute"? I don't think that is used elsewhere. So I might add new classes, "ElementProperty," "StringElementProperty", "AnnotationElementProperty."

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ontype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainabletype-tech-debtIssues that slow or block desirable development paths for Dartdoc, or create such problems for users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions