Earlier quoted context omitted.
Changing attributes of UI elements defined in code vs some XML format is in my mind the same level of effort. button.SetBackground( ) or " /> I see no difference there. EDIT: Ok the main difference I guess would be having to switch files (and thus context) which could be annoying. Plus there's also the non-zero performance impact from having to parse an XML format.
What if you have stacked elements, or elements within elements. In code it's something weird like Box(button( Icon() )))
Box(
Button(
Icon(...)
)
)
Weirder than: