https://kotlinlang.org logo
Title
m

mitch

04/16/2023, 10:27 PM
Heya all! I’ve written an article around various error handling strategies in Kotlin, in particular on how they compare to one another in terms of succinctness, readability, and overall cognitive complexity score. In this article I’ve also compared Arrow’s current typed-error handling approach, as well as the one using context receivers which is also gaining more traction. I may have missed some points or have misunderstood some concepts, so if you noticed anything that you’d want me to make more accurate or clarify, please let me know in a feedback! If you like the article please don’t forget to also share this to your colleagues, leave a comment perhaps several claps. https://medium.com/@mitchellyuwono/typed-error-handling-in-kotlin-11ff25882880
r

raulraja

04/17/2023, 6:17 AM
@mitch I read the article and it's a great comparison of all error handling styles. Thank you for writing this 🙏 . Also loved:
Of all 6 approaches explored, Arrow’s
context(Raise<E>)
achieved the most optimized score on all aspects of developer productivity. This includes having the lowest cognitive complexity, the lowest cyclomatic complexity as well as the most succinct with the least lines of codes.
Would be great to link it or have a version of it at https://arrow-kt.io/community/blog/
s

simon.vergauwen

04/17/2023, 6:48 AM
Really nice article! 😍 Super excited to see Sonarqube also likes the solution 😁 Yes, we should add it to the blog page!
o

Oliver Eisenbarth

04/17/2023, 9:40 AM
Great article, shared it with all my 39 Twitter followers. 😁 Love that you ran the extra mile and referred a KEEP and that article from Elizarov.
m

mitch

04/17/2023, 11:04 AM
That’s really awesome @Oliver Eisenbarth! thank you so much. Hopefully your Twitter followers would find it useful! @simon.vergauwen @raulraja how would I add that to Arrow community blog?
r

raulraja

04/17/2023, 11:13 AM
You could submit a PR to https://github.com/arrow-kt/arrow-website/tree/main/content/blog There is instructions in the README if you want to test it locally.
s

simon.vergauwen

04/18/2023, 12:25 PM
I promoted your blog on Twitter and Mastodon as well @mitch. Thanks again for writing this great article 🙌
m

mitch

04/18/2023, 9:36 PM
Thank you @simon.vergauwen!! 🙌