Building Kotlin-first Libraries
Originally presented at Kotlin London, March 7th 2024.
Abstract
Kotlin libraries are often written with Java typing at heart, but what if it didn't need to be that way? What if Java support was an afterthought? Join us to learn the story of how we designed strongly-typed libraries for Kotlin and Swift at the same time by leaning hard into type theory. We'll discuss how to then generalise a type-safe API into something unsafe for Java consumers, and how to leverage tooling to protect your library consumers from hard-to-spot breaking changes.
Slides
References
- Kotlin Language Announcement - infoworld.com
- Software Design Tree and Program Families - Chris (from Sweden)
- Make Invalid States Unrepresentable - Andrew Watson
- Public API Challenges in Kotlin - Jake Wharton
- OkHttp Interceptors - Square Inc.
- Metalava - Google
- Metalava Gradle Plugin - Tyler Wong