A Functional Approach to Exception Handling
Channel: Virtual Kotlin User Group
Date: 2021-09-30

Hello, fellow Kotliners!

It's time for our next virtual get-together. This time Tristan Hamilton will give us his talk "A Functional Approach to Exception Handling".

Here is the abstract:
"why catch if you never throw?"
An introduction into the world of functional programming by discussing an approach to exception handling sometimes referred to as "railway oriented programming".

About the speaker:
I've been working in tech for the last 6 years and impersonating an Android developer for less than half that. When not writing code for a living, you'll find me messing around with synthesizers, climbing or hanging out with my cats.

We are also always looking for speakers and talks. Let us know and don't be shy, we are a friendly bunch and are happy to help you with your speaker career!

You can reach us here through meetup or on the #vkug channel on the Kotlinlang Slack. Get an invitation here: https://surveys.jetbrains.com/s3/kotlin-slack-sign-up

And here is the information Tristan mentioned:
Resources:
Monad in pictures: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
Kotlin result type: https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Result.kt
Kotlin result KEEP doc: https://github.com/Kotlin/KEEP/blob/master/proposals/stdlib/result.md
Exception handling talk at kotlinconf 19: https://www.youtube.com/watch?v=pvYAQNT4o0I
kotlin-result repo (please ⭐️ and readme has lots of goodness too): https://github.com/michaelbull/kotlin-result
Scott-Wlaschin railroad programming: https://fsharpforfunandprofit.com/rop/
Arrow describes monad comprehensions: https://arrow-kt.io/docs/patterns/monad_comprehensions/
Result on Android:
  - https://adambennett.dev/2020/05/the-result-monad/
  - https://proandroiddev.com/railway-oriented-programming-in-kotlin-f1bceed399e5 
The big functional programming lib for kotlin: https://arrow-kt.io/ 
If you are interested in learning fp  from the ground up, there is a very popular book for learning fp in scala (the red book: https://www.manning.com/books/functional-programming-in-scala) that is currently being ported to kotlin: https://www.manning.com/books/functional-programming-in-kotlin
Definitely Non null types KEEP (intersection type): https://github.com/Kotlin/KEEP/issues/268
Context Receivers KEEP (coeffects section): https://github.com/Kotlin/KEEP/blob/context-receivers/proposals/context-receivers.md#algebraic-effects-and-coeffects

And here are the links to the events we mentioned at the end: 
- Kotlin Dev Day: https://kotlindevday.com/
- Java Advent (https://javaadvent.com) RfP: https://tinyurl.com/javaadvent-rfp-2021