Reputation: 34081
In Scala you can delay the implementation with triple question mark as:
def doSomething(s: String): Int = ???
Does Kotlin support such as feature?
Upvotes: 4
Views: 431
Reputation: 7604
There's a TODO
function that does something similar. You can either call it with a string that gives a reason for it being unimplemented, or you can just say TODO()
with no arguments. The return type is Nothing
, but it will throw a NotImplementedError
(just like ???
in Scala), as Jörg W Mittag pointed out.
Upvotes: 8