We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
"Monad I Love You Now Get Out Of My Type System" by Gjeta Gjyshinca (Strange Loop 2022)
Discover a revolutionary approach to concurrency in Scala, abandoning invasive monads and free monads, to achieve better parallelism, ease of use, and readability, inspired by a state machine representation and scheduler.
- Functional programming is hard in Scala due to the complexity of monads and free monads, which invade the type system and force developers to do type acrobatics.
- The current solutions to concurrency in Scala are inadequate, leading to developers feeling frustrated and stuck.
- Referential transparency, purity, and composability are important concepts in functional programming, and are often difficult to achieve in Scala.
- The author argues that the current approach to concurrency in Scala is analogous to being asked to return to the burning building without protecting oneself.
- The solution proposed is to abandon the current approach and adopt a new one that is more straightforward and easy to understand.
- The new approach is based on the idea of creating a state machine representation of the code at compile time, and then using a scheduler to run the code asynchronously.
- This approach allows for better concurrency and parallelism, as well as ease of use and readability.
- The author claims that this approach has been successfully implemented in a large-scale production environment, and invites the audience to try it out.
- The talk concludes with a call to action, asking the audience to make a choice between embracing the new approach or sticking with the old one.