Kotlin for the Pragmatic Functionalist
summary
Kotlin already offers data classes, sealed classes, inline functions and extension functions and the community builds on them with the Category library that adds compile-time typeclass-like lookups (currently a runtime map with O(1) access), code generation via kotlinc metadata, and optics for immutable updates. The library implements Option, Try and List as tagged containers, provides higher-kinded types emulation plus factories, and a monad binding abstraction that wires into coroutines, Rx and IO. A language proposal under KEEP-87 aims to move the lookup to real compile-time injection.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:39Our community goal
- 3:17Key cornerstones
- 4:02Data & sealed classes Data
- 5:55Inliner
- 7:41Extension functions
- 10:13Key features
- 10:56Extension Interfaces
- 12:09Extension Interface Jsonable
- 16:57Ad-hoc polymorphism for generic type constructors
- 18:07Generic constructor implementations
- 19:19Returning generic type constructors
- 19:50Extension Interface Factory
- 21:05Safely downcasting generic containers
- 21:53Ad-hoc polymorphism for generic constructors
- 24:08Regular async code
- 26:01Ad-hoc polymorphism for imperative async code
- 29:46Smarter boilerplate removal
- 30:24Bye bye boring code
- 32:17Challenges & Pitfalls
- 34:39Bring your tools in
related talks
40mFunctional Programming in Kotlin with Kategory
30mWhat can Kotlin do for me?
50mPure Kotlin.
34mKategory: Functional Data Types & Abstraction for Kotlin
29mKOTLIN FOR SCALA DEVELOPERS
39mHow to Kotlin - from the lead Kotlin language designer
46mKotlin 102 - Beyond the basics
27mWhy Kotlin is my favourite example of Functional Programming?
