Should I specify return type or not?


#1

According to docs — "If a function has a block body (in curly braces, not after '=') and returns Unit, one can omit the return type annotation:"  What is recommended way? I don't see note about it in http://confluence.jetbrains.net/display/Kotlin/Coding+Conventions


#2

When you want to return Unit, the recommended way is to omit the type annotation.