
Making Dart a Better Language for UI - skybrian
https://medium.com/dartlang/making-dart-a-better-language-for-ui-f1ccaf9f546c
======
pixelpush
_" We’re a lot closer to the nasty low-level imperative code that drives
people to using templates. When we looked at real Flutter code, we were sad to
see a lot that looked like this. So, about a year ago, the Flutter team asked
us on Dart to come up with language changes to make UI code written in Dart
easier to write, read, and maintain."_

Nothing about this code snippet is "nasty" or "low-level". It is trivially
easy to write and understand. It is fully maintainable due to its simplicity
and clarity.

It's sad to see that developers think this is somehow bad code. It probably
takes a lot of experience to understand _why_ it is totally fine.

Too many developers are lost trading added complexity for aesthetics. One more
way to write the same thing. One more thing that will be inconsistent across
the codebase. One more thing to learn how to read. It all adds up. All the
tooling has to be updated to support this stuff. How will it look and feel in
the debugger? (Does Dart even have proper debugger support?)

In the end, all you get is the _looks_ of being declarative while having none
of the benefits of being declarative.

~~~
skybrian
"Nasty" may be an exaggeration, but readability improvements do matter.

Yes, Dart has a debugger, not to mention "hot reload" that's a big selling
point for Flutter. The Dart team maintains their own tools and is well aware
of the cost of maintaining and improving them.

------
FragenAntworten
The way list comprehensions are a logical consequence of the new features
rather than an intended feature themselves is very satisfying, and speaks to
the general and composable nature of the new features. This was an exciting
read!

