may be if I overload invoke operator I will get ve...
# announcements
d
may be if I overload invoke operator I will get very close to what I want with parentheses?
g
You can overrider invoke operator. Syntax will be like:
"XML encoding with Kotlin"()
actually for simple case with title easier just to write simple version of title function to use it without lambda:
Copy code
title("XML encoding with Kotlin")
This works only for simple cases, but also for most common ones. For cases where I have complicated dsl with mix of different operators I would prefer more explicit approach (for example
text("Some text")
instead of
+"Some Text"