The standard library[0] functions `apply` and `run` are really nice with builders.
When I converted Red Moon[1] from Java to Kotlin (no functionality changes), the code base shrunk by around 1/6.
[0]: http://beust.com/weblog/2015/10/30/exploring-the-kotlin-stan... [1]: https://github.com/raatmarien/red-moon
The standard library[0] functions `apply` and `run` are really nice with builders.
When I converted Red Moon[1] from Java to Kotlin (no functionality changes), the code base shrunk by around 1/6.
[0]: http://beust.com/weblog/2015/10/30/exploring-the-kotlin-stan... [1]: https://github.com/raatmarien/red-moon