for (var foo in bar) print(foo);
for (final foo in bar) print(foo);
Is there any difference in performance between these two? Or is the only difference "avoiding accidental reassignments"?
Edit:
prefer_final_locals mentions compiler performing optimizations when final is used. Will it apply here? dart2js output matches for the 2 snippets above. Not sure about dart2native.