When Apple revealed SwiftUI last week during WWDC 2019, we also saw a new feature in Swift proposed as a draft on Swift Evolution (Function builders). Together with the Property wrappers proposal and some other recent Swift features, in Swift 5.1 it will be now possible to define DSLs that will enable code like this (screenshot from this WWDC session):
Yes, this is Swift code!
As you can see, it will soon be possible to natively support HTML by implementing a DSL for it in Swift (like Vaux does) with all the advantages that come along with it: Great compiler errors as feedback, autocompletion, more readable and flexible functions, Swift-native control flow etc.
While Leaf is a good template engine, I think it would make sense to introduce an alternative to Leaf based on such a DSL for HTML, CSS and the likes of it. What do you guys think?