A Result for Our Issues
summary
Claims that Kotlin coroutines’ default exception propagation makes composition hard and offers a concrete alternative: a small library called asito that models errors as sealed classes for errors (Success/Failure), provides combinators like map and flatMap plus fold, zip and runCatching helpers, and ships a one-line Retrofit adapter to return Result types. Code examples show replacing try/catch with composable results, integration with Retrofit, and benchmarks claim a lighter, focused footprint compared with Arrow or kotlin.Result.
AI-written summary · about
chapters (13)
- 0:00Start
- 4:41Callbacks - Pros
- 5:15Callbacks - Cons
- 11:44Coroutines - Pros
- 14:10Coroutines - Exception example
- 15:55Esito Core
- 22:49Transformation - Example
- 24:52Side Effects - Example
- 26:13Chaining - flatMap example
- 31:02Testing
- 32:36Retrofit - Example
- 34:47Retrofit - Network Error example
- 35:53Benchmark existing solutions
related talks
48mKotlin & Functional Programming: pick the best, skip the rest
37mHow Kotlin Lets Us Remove Exceptions from Our Code
43mError Handling Strategies for Kotlin Programs
41mThe Functional Fix: Kotlin Error Handling Made Elegant
41mAn Arrow to the Kotlin
47mFunctional programming in Kotlin: exploring Arrow
17mDesigning for Errors in a Kotlin-first SDK:When to throw, nullify, or return a Result.
44mKotlin & Functional Programming: pick the best, skip the rest
