Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Language-level coroutines derive no direct benefit from Loom but it also doesn't hurt them. The benefit is you can just stop using those language features, or if you already have them in wide use, you can just wrap all your code in runBlocking{} and virtual threads. Also, no work is needed to start using virtual threads because they're a library/runtime feature not something a language has to support. One of the benefits of being a JVM language - free upgrades.

Exception: GUI code. Kotlin Coroutines is deeply integrated into Jetpack Compose. In theory parts of the framework are thread safe but it's not well documented and all the examples / tutorials want you to learn coroutines.



> The benefit is you can just stop using those language features

Not at all. This is like saying "now the runtime supports plus and and minus natively, so you don't have to use a math-library anymore".

Libraries Like ZIO, Cats Effect or Arrow-KT offer a vast amount of functionality that you still have to rebuild with Loom. Just the foundations are different.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: