I'm not a fan of that 2nd one. It introduces statefulness. That's the sort of thing I dislike greatly about, for example, DB transactions. I have to remember if I already called
.beginTransaction()
for example. I'd rather wrap text in composable DSL functions, feels more like HTML: