4 ms·
I highly recommend reading the DSX issue on github, I am one of the supporter and highly disagree with the author of this article. They don't seem to know how
by solidr53 8y ago
I highly recommend reading the DSX issue on github, I am one of the supporter and highly disagree with the author of this article.
They don't seem to know how JSX works, tell us what Flutter wont be instead of what it could be. I am truly sorry for their fatal decisions in this aspect.
https://github.com/flutter/flutter/issues/11609 https://github.com/flutter/flutter/issues/11609
- k__ 8y agoThey should at least add some factory functions, so you don't have to throw all these "new"s around...
- solidr53 8y agoYes definitely, and enforce a naming convention for widget childrens. They are currently all over the place.
- thosakwe 8y agoThe "new" and "const" are optional now, as many people requested it, since it creates a lot of extra noise. I too would appreciate a naming convention; that would make things a lot easier.
- wstrange 8y agoI don't think this is a fatal decision at all. With Dart 2 syntax making new optional, widget layout is quite compact and easily readable. I think the Flutter team has made the right call here. Sticking with pure Dart has a lot of advantages (tooling, IDE support, etc.)
- thosakwe 8y agoI agree with this, and in reference to the prior comment, yes, I’ve seen the issue in question and read it, I even commented on it a few days ago. IMO the benefits of something like JSX really don’t make as much sense in Flutter. For me, the main thing is, why use XML syntax to represent something that’s truly not XML at all?
- natecavanaugh 8y agoIf you think of JSX as a DSL rather than a souped up XML, it makes more sense. XML is just a different kind of abstraction, so rather than thinking of it's output, it's good spots are in the way it helps structure your input.
- maxdo 8y agocode and layout should be separated in my opinion, and jsx with thinks like styled-components did a great job, so you can easily read the UI structure rather then "complite" in your brain those tons of dot's braces align differently.