Skip to content

Symbols create a tooling gap #13056

Closed
Closed
@sethladd

Description

@sethladd

Symbols are often used to refer to fields or classes. Currently, the tools aren't able to give good feedback or assistance when symbols are used. e.g. if a symbol that is meant to refer to a field name, the tools have no way to detect if the symbol was misspelled, and no way to help refactor-rename.

We now have symbols, which are often used to represent names in Dart code, I'm concerned we're losing some tooling ability.

e.g. this is common in Polymer.dart code:

    bindProperty(this, const Symbol('timestamp'),
        () => notifyProperty(this, const Symbol('second')));

The first symbol is the name of a field, the second symbol is the name of a getter. If I rename my field, the symbol is left untouched. And if I misspell the symbol name...

This lies at the intersection of tooling, API design, and maybe language. Do you think we can do better here? Should the API be changed or should the tools help here?

Metadata

Metadata

Assignees

Labels

closed-not-plannedClosed as we don't intend to take action on the reported issuedevexp-refactoringIssues with analysis server refactoringslegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions