---
title: "Louis CAD (@LouisCAD) | Hashnode"
description: "Kotlin GDE. Read the latest articles by Louis CAD on Hashnode."
url: "https://hashnode.com/@LouisCAD"
---

@LouisCAD

# Louis CAD

@LouisCAD · Tours, France · Joined June 2017

Kotlin GDE

## Comments

[Inline functions don't all bloat the bytecode. In the example, there's 3 function calls, 3 if/else, and a few local variables introduced. Using a class would actually lead to more bytecode bloat, I'll let you check that. Note that I never said to never use a class to return multiple values, I just showed another way, which makes sense in some cases like the one I showed.](https://hashnode.com/posts/how-to-return-2-values-with-0-allocation-in-kotlin/61487096699fe76cd34845e5/comment/61b281036a81cf6b31dfd1c0#reply-61b33213fccdb516104ba07e)

Reply · Article · Dec 10, 2021 · [How to return 2+ values with 0 allocation in Kotlin](https://hashnode.com/posts/how-to-return-2-values-with-0-allocation-in-kotlin/61487096699fe76cd34845e5)

[That one is a good alternative. It's not immune to late racers (so, the use case of race rather than raceOf), but I believe it's possible to make some edits that make it supported and thread-safe for this use case. Now I'm wondering what would perform best between your snippet and using select.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f/comment/619798f3df376a260c5876dd#reply-61a23c16a707ae38156d6111)

Reply · Article · Nov 27, 2021 · [Coroutines racing! Why, and how.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f)

[Can't work for the same reason as the other one you shared. For reference, here's a playground that proves it: https://pl.kotl.in/MArMNltGT](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f/comment/61925833fd3a1a5a01a8897b#reply-6192611efd3a1a5a01a88a34)

Reply · Article · Nov 15, 2021 · [Coroutines racing! Why, and how.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f)

[Marek Langiewicz Nope, the winner's job is not finished until after the launch block is complete, so cancellation happens before, so it cannot work. Here's a playground that proves it: https://pl.kotl.in/MArMNltGT](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f/comment/61922d46fd4e554b5f3e8111#reply-6192605ffd4e554b5f3e84e4)

Reply · Article · Nov 15, 2021 · [Coroutines racing! Why, and how.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f)

[This cannot work, because it also cancels the coroutine that is about to win.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f/comment/61922d46fd4e554b5f3e8111#reply-61923ed80ba49f4c919485af)

Reply · Article · Nov 15, 2021 · [Coroutines racing! Why, and how.](https://hashnode.com/posts/coroutines-racing-why-and-how/618a2953f991b025366df06f)

[I hope we can have themes that affect only the code snippets color schemes. My top wish is light scheme on light theme, and dark scheme on dark theme.](https://hashnode.com/forums/thread/custom-themes-and-a-marketplace/comment/618e4b6ae61d1c383da7a740)

Comment · Thread · Nov 12, 2021 · [Custom themes and a marketplace](https://hashnode.com/forums/thread/custom-themes-and-a-marketplace)

[Please, when you add editing support, implement a reliable offline mode.](https://hashnode.com/posts/the-hashnode-mobile-app-has-finally-arrived/613efb8953358e1531071ca8/comment/6145fe34e1f56817e3606ba4)

Comment · Article · Sep 18, 2021 · [The Hashnode Mobile App Has Finally Arrived 📱🚀](https://hashnode.com/posts/the-hashnode-mobile-app-has-finally-arrived/613efb8953358e1531071ca8)
