Provide properties syntax for accessing Java getters/setters


I’ve just started creating a DSL in Kotlin and noticed that to set a field of a Java object I had to call the setter method, like so:


I think it would be cool if I could modify the field from Kotlin as if it were a property, like = "helpermethod"

I think this would allow to write even cleaner DSLs, e.g.

person {   name = "helpermethod" }

instead of

person {   setName("helpermethod") }

Splease subscribe to this issue: