Roman Elizarov
1 min readNov 22, 2018

--

The body of the coroutine scope builders does not force you to do anything. When you do launch { ... } you write your code inside curly braces. While you can technically do launch(::foo), you should not be doing it. Do launch { foo() } instead and implement foo() according with the principles described in this story. This will lead to a more consistent, and easier to understand code.

--

--

Roman Elizarov
Roman Elizarov

Written by Roman Elizarov

Project Lead for the Kotlin Programming Language @JetBrains

No responses yet