Skip to content

Lint request: avoid dynamic dispatch #57971

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

Closed
srawlins opened this issue May 30, 2019 · 4 comments
Closed

Lint request: avoid dynamic dispatch #57971

srawlins opened this issue May 30, 2019 · 4 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-request type-enhancement A request for a change that isn't a bug

Comments

@srawlins
Copy link
Member

Dynamic dispatch has several costs: it can be expensive, and can prevent tree-shaking.

The lint rule would report any methods being called on dynamic (other than methods on Object?).

Examples:

var a;
a.length;

getLength(a) {
   print(a.length);
}
@srawlins srawlins added type-enhancement A request for a change that isn't a bug linter-lint-request labels May 30, 2019
@srawlins
Copy link
Member Author

CC @vsmenon @matanlurey

@matanlurey
Copy link
Contributor

10/10 would adopt.

@srawlins
Copy link
Member Author

srawlins commented Aug 5, 2019

Oops originally requested by @matanlurey at https://github.com/dart-lang/sdk/issues/33121. Lots of nummy discussion there. But I think this issue does belong here.

@srawlins
Copy link
Member Author

Replacing with #57703

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants