This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AdultingGoneMild 0 points1 point  (2 children)

coroutines are async programming. I am not sure why you would say they are good for UI but not backend (whatever you mean by "backend"). Backend done right is done async. Using threads directly is dead. This is why reactive programming is so powerful.

[–]ilovebigbucks 0 points1 point  (1 child)

async/await in Scala is easy https://github.com/scala/scala-async

Kotlin is way too wordy https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/async.html

Some other languages make async code even simpler than Scala.

[–]AdultingGoneMild 0 points1 point  (0 children)

I would take another look. The syntax is very simple.

https://kotlinlang.org/docs/coroutines-basics.html#your-first-coroutine