And more general than my question above: is there a comprehensive list of naming conventions used in Kotlin
Some examples: the stdlib is full of functions that have an
OrNull
variant. Or in the coroutines lib, it's conventional to either write a
suspend fun foo()
or write a non-suspending extension
fun CoroutineScope.foo()
, but not
suspend fun CoroutineScope.foo()
. And likewise,
suspend fun foo(): Flow<Bar>
usually doesn't make sense, but
fun foo(): Flow<Bar>
is more conventional.
It's probably a good idea to use the same naming conventions in your own Kotlin APIs.