Programming with Result: Considerations

An important missing Kotlin feature to keep in mind when using Result. What the true performance cost of exceptions is, and how this relates to using Result. Things to keep in mind when using Result in a multithreaded or coroutine context.

Gabriel Shanahan
The Kotlin Primer
Published in
5 min readOct 17, 2022

--

— — — — — — — — — — — — — — —

THE CURRENT VERSION OF THIS ARTICLE IS PUBLISHED HERE.

— — — — — — — — — — — — — — —

Tags: #FUNDAMENTAL CONCEPT

This article is part of the Kotlin Primer, an opinionated guide to the Kotlin language, which is indented to help facilitate Kotlin adoption inside Java-centric organizations. It was originally written as an organizational learning resource for Etnetera a.s. and I would like to express my sincere gratitude for their support.

It is recommended to read the Introduction before moving on. Check out the Table of Contents for all articles.

In the previous articles, we introduced programming with Result and described how it makes your code easier to write, easier to reason about, and safer. In this article, we want to take a…

--

--