Posts

Showing posts from May, 2025

04 João Esperancinha

Image
Kotlin can be very handy and easy to use. Kotlin offers the possibility to develop code that is easy to understand, safe, immutable, and thus predictable and follows standards that avoid side effects. I realized that very quickly after I started my Kotlin journey that already amounts to more than 4 years. Having said that, some concepts can be difficult to visualize which can generate some confusion. While there are several advantages to using Kotlin, those advantages can only be put into practice if we can understand what the JVM is doing to our code. There are situations that may seem to question of non-nullable mark offered by Kotlin, others where you'll find functionalities that may seem to serve no purpose at first glance and if you are coming from the Java world you may find confronting the concept of specifically tail-recursive fuctions and its usages. All of these situations have created some confusing situations professionally, generating delays in development, that could ...

Could Virtual Threads cast away the usage of Kotlin Coroutines? What exp...

Image
Kotlin coroutines have been around since 2017 and have contributed to defending the usage of Kotlin in everything from Android development to multi-platform, to developing highly available and resilient services making optimized use of resources, and allowing threads to be available as soon as possible. The use of coroutines also implicated the usage of context and scopes, which for many became complicated abstract concepts. And then Java 21 was released in 2023 and while researching and applying this at work I realized that in some places, it makes sense to remove the usage of coroutines and replace them with virtual threads. On the other hand, in other places, the usage of Kotlin coroutines seems to remain justified. In this session I will talk about funny examples and real-life problems that I found on the field, why did they occurred, and how I solved them. We may find a common ground between Java Virtual Threads and Kotlin Coroutines, or maybe not. After this session, you will com...