Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They didn’t create Dart for UI. It was dead and they shoehorned it into Flutter.


To be fair it’s not a bad choice for UI: supporting both AOT and JIT speeds up the dev loop and allows compiled performance + hot reloading in dev, which is good for UI development.


Considering that Dart was made to run in browsers, they did in fact.

The APIs the OP are complaining about are Flutter's not Dart's. Flutter tried to do a vdom-like thing that also included styling on top of regular function call syntax and it is... what it is.


The style of writing the UI code takes some time to get used to, but the composability is really nice. For example, if I want to center something, I use Center and it works as I predicted. If I want to change the opacity of something, I don't need to find the opacity property of a particular widget, I can just...use Opacity, and it'll work for everything.

This style is a way to have (extreme) composition over inheritance, which apparently was very useful for the framework authors who mentioned that they didn't need to keep reimplementing opacity for example for every single widget.


Yeah it was an attempt to fix JS before JS improved a lot in recent years, and before TS took off.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: