Re:Flutter for Linux
by cutler on Thursday July 09, 2020 @03:58AM
(#23777950)
Flutter widget hell makes Javascript callback trees look tame. I just don't get the buzz around this atrocious style of coding.
[ Parent
| on HN ]
You commented this elsewhere too without elaboration. I'm curious as to what you mean by 'widget hell'.
I founded the nested tree of widgets syntax good after getting over the (short) initial learning curve. Some basic good programming practice over shared bits and it was very maintainable even for complex screens.
Why is this style of programming frowned upon in Javascript yet idiomatic in Flutter?
Re:Flutter for Linux
by imtringued on Thursday July 09, 2020 @06:15AM
(#23778618)
I'm not sure what you are talking about. Javascript developers also use HTML and the ability to nest HTML elements is "idiomatic" as well.
This is a wonderful answer and much better than what I was about to write.
Flutter Widgets, like HTML are declarative. They're just hierarchical information. This works in HTML, and it works in Flutter - there's nothing to get confused about.
Nested control flow (if statements, loops etc.) obscures the actual behaviour and so good practice is to break it up until it is clear and understandable.
Re:Flutter for Linux
by BiteCode_dev on Thursday July 09, 2020 @06:07AM
(#23778583)
Widgets are declarative, like in HTML, the nesting is additional information. With callback hell, you nest logic, and actually obfusc information about the control flow.