|
|
|
|
|
by tsss
2572 days ago
|
|
Bullshit, any language with a macro system can do this. LISPs in particular are known for being code and data at the same time and this idea is way more old school than XML. You could also make a DSL that builds something like an AST of your UI in a similar fashion to free monads. It's no surprise that XML seemed more attractive when your alternatives were Java or, even worse, Objective C. But really both options are absolutely terrible. Thankfully we are very slowly making some steps forward again with Swift. |
|
SwiftUI is using new Swift features sort of similar to Haskell's "do" notation, which isn't actually itself monads.