3 ms·
I guess I'm not sure why this is better than the Kotlin/Tornado/SwiftUI approach of allowing you to move a lambda in the last parameter visually out of the func
by thu2111 7y ago
I guess I'm not sure why this is better than the Kotlin/Tornado/SwiftUI approach of allowing you to move a lambda in the last parameter visually out of the function. So:
container {
text(weight = "bold") { "madeofpalk" }
image(src = profilePic)
}
It seems more logical and consistent with the rest of the language. The only reason for the HTML-like syntax is JavaScript's tight connection to the web, after all.
- madeofpalk 7y agoI apologise for not being clear, but the point I'm trying to make is not around the angle bracket syntax, but with how light the DSL is and for any sort of logic syntax, you just escape back to Javascript. JSX does not have conditionals or loops in its syntax. SwiftUI does.