final
is too long
#2868
Labels
feature
Proposed language feature that solves one or more problems
state-duplicate
This issue or pull request already exists
Uh oh!
There was an error while loading. Please reload this page.
Of all the keywords a language introduces, declaring a local final variable could easily be the most frequently used one.
final
(5 letters) just seems too long compared to other languages (Rust ->let
(3), Swfit ->let
(3), Kotlin ->val
(3)). I usually disable the lint ruleprefer_final_locals
and go allvar
in my projects just to type less cuz it's used so frequently, typing 2 less letters can really speed up coding.One similar language is JavaScript. It uses
const
(5) for this purpose. JavaScript also has to typefunction
(8) to declare a function. Other languages have much shorter keywoards for that: Rust ->fn
(2), Swift ->func
(4), Kotlin ->fun
(3). You can see the difference here. It would be great if Dart introduces a shorter keyword (likelet
orval
) to replacefinal
.The text was updated successfully, but these errors were encountered: