3 ms·
The point is that a Dart library can write a parser for XML, but if XML was the only supported format, it's hard to go in the other direction. Also if you read
by nikki93 9y ago
The point is that a Dart library can write a parser for XML, but if XML was the only supported format, it's hard to go in the other direction. Also if you read example Flutter code, you may notice that their UI spec DSL-like is 'declarative'.
In terms of a 'change' as you point out, change is a comparison between two points, and when you compare XML to this declarative paradigm, the main difference isn't along the declarative-or-not axis (because they are similar in that regard), but things like programmability (often with 'templates' in XML) or parseability, in which case in-language DSL-likes work really well (you can write, for example, a lambda returning a UI fragment that closes over some parameters, or you can `.map(...)` a UI fragment over a `List`, ...). The change you may be pointing at is against maybe original GTK-like or Android-Java-like imperative constructs, but this discussion is about a Flutter-XML comparison.
Of course, in the Flutter case, the DSL-like is actually just function calls and doesn't involve macros or a separate code generation step.