Skip to content

[proposal] add const at compile time (where possible) #56669

@iapicca

Description

@iapicca

related issues

note quote from the former

In theory, const-ness should give apps a performance boost, but during development the lints enforcing const are constantly nagging developers: "Make this const" or "This cannot be const anymore".

proposal

if a linter is able to tell if a variable, a constructor or (in flutter) a child should be a constant,
wouldn't be more developer friendly to automatically make it a constant at compile time
without (quote) "nagging developers"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).triage-automationSee https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.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