woud love to write annotations with less const
noise
#24620
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
When porting angular2 typescript examples, I feel like that in many cases the dart syntax is sweeter, except for the
const
noise you sometimes have with annotations.I was just trying to make myself a library with annotations, but in this case, it becomes even worse:
I would love that in future dart version, all those const annotations wouldn't be necessary anymore. Can I have any hope for this?
In my naive point of view, I would say that if the variable must be constant, dart kind of automatic marks the list constant(behind the scenes). And if that is not possible, warn the user? Isn't that also what happens with strings and integers?
The text was updated successfully, but these errors were encountered: