Kotlin's approach to anonymous classes