Given Google's recent announcement of official Kotlin support for Android development, I thought it might be timely to poll the community for some awesome golfing tips for this relatively new JVM language.
Kotlin includes a unique combination of features among it's JVM siblings which makes it potentially attractive for golfing:
- operator overloading
- local, infix, and static extension functions
- smart casts
- Groovy-style type-safe builders
- type aliases
- an extensive functional collections package
- scripting support
So, how do I squeeze the last few bytes out of my Kotlin program? One tip per answer, please.