Coroutines and Loom behind the scenes by Roman Elizarov
Kotlin by JetBrainsRecommended by 1 HN commenter across 1 month, 2023–2023
talk · advanced · 2023–2023 on HN
Roman Elizarov compares Kotlin Coroutines with OpenJDK Project Loom virtual threads, looking at their design goals and how those translate into different implementations and tradeoffs. He addresses how the two can coexist.
Pointed to in Java 21 and Loom discussions as the Kotlin lead's authoritative view on coroutines versus virtual threads.
Up next
18 mo on HNRuby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich
Confreaks
Recommended 17× on HN · 2013–2026
16 mo on HNThe spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
Recommended 17× on HN · 2022–2025
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
Recommended 15× on HN · 2017–2025
15 mo on HNRailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
Recommended 15× on HN · 2015–2025
14 mo on HNWhat the heck is the event loop anyway? | Philip Roberts | JSConf EU
JSConf
Recommended 16× on HN · 2015–2025
12 mo on HNHow To Design A Good API and Why it Matters
Google TechTalks
Recommended 12× on HN · 2011–2025
12 mo on HNThe Problem with Time & Timezones - Computerphile
Computerphile
Recommended 12× on HN · 2014–2026
10 mo on HNRailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson
Confreaks
Recommended 6× on HN · 2017–2020
9 mo on HNBrian Goetz - Stewardship: the Sobering Parts
ClojureTV
Recommended 10× on HN · 2014–2025
10 mo on HNRuby Midwest 2011 - Keynote: Architecture the Lost Years by Robert Martin
Confreaks
Recommended 10× on HN · 2013–2022
10 mo on HNJavaScript: The Good Parts
Google TechTalks
Recommended 11× on HN · 2009–2020
9 mo on HNUsing Python to Code by Voice
Next Day Video
Recommended 12× on HN · 2013–2025
5 comments from Hacker News
Here's a take from Roman Elizarov (Kotlin bias) - ▶ this video I imagine a lot of the missing structured concurrency will get built up over time on the Java side, but it is an interesting talk regardless.
here is the talk by Roman Elizarov, the Kotlin project lead, at KotlinConf 2023 about Coroutines vs VThreads: ▶ this video short version: both were optimized for different things, so there is a place for both of them.
It's pretty hard to use Kotlin without co-routines these days. Most modern Kotlin frameworks tend to use them. And they work outside the JVM as well. Mostly we're talking about Java projects focusing on doing things the Java way that may or may not be using Kotlin for that. Kotlin mobile is unaffected; it won't get Loom any time soon (as far as I know) and things just don't work the same way there. Kotlin (and coroutines) are the go to solution there. I don't see that changing. And from having used coroutines with Spring extensively, I kind of like it. Works great. Makes everything easier. Especially the unholy mess that is web flux. There aren't a lot of things that loom does that Kotlin doesn't do already. Green threads. Check. Structured concurrency. Check. At best it will do them a little faster with loom in place, which isn't a bad thing of course. But it doesn't really fix a problem I have. Being able to use threaded and blocking IO things in a non blocking way with no threads is going to be nice. Great if you are stuck with a lot of legacy stuff. Roman Elizarov addressed a few things regarding Loom at the last KConf: ▶ this video
Yeah, Kotlin does have the colored-function problem, in the same way that Node/JS has. Loom and Virtual Threads are one area I'm not as familiar with. What I do know is that you can configure virtual threads as the coroutine dispatcher for Kotlin coroutines, and in a recent video Roman Elizarov talked about how the default "Dispatchers.IO" could theoretically leverage VT's in some future JDK. ▶ this video
> 5. Java with virtual threads now has far better support for async programming than Kotlin or Scala. It is now competitive with Golang in async ease-of-use green thread/stackfull coroutine such as in go/java and stackfless coroutine as in kotlin are well know solutions for introducing async programming in a way that feel natural to dev. They both have strength and limitation, i don't think one offer "far better support for async programming", and even more importantly they are not mutually exclusive and can be used together depending on one needs (see ▶ this video )