Kotlin analog of ? ? ? in scala


Sometimes while designing new components it’s easier to write signature and delay the implementation for later.
In Scala allows you to do so via ??? construct. Example:

val elements: List[Int] = ???
val result = process(elements)

In Kotlin I can emulate it like that:

val noImpl: Nothing
    get() = throw kotlin.RuntimeException("not implemented")

(in some cases I will get warning “unreachable code” though)

But maybe stdlib already contains solution for that?




I really like the pragmatism and usability of Kotlin! TODO get’s even higlighted automatically in most environment (although I suspect that most devs are using IntelliJ IDEA anyway).