Nicer Data Transformation with KopyKat and Optics
May 04, 2023
17 min
Free
kotlin
immutable-data
data-classes
arrow-optics
data-modeling
compiler-plugin
arrow
ksp
code-generation
functional-programming
Description
This recording from KotlinConf '23, brought to you by American Express, features Alejandro Serrano Mena discussing techniques for improving data transformation in Kotlin. The talk delves into the limitations of the default 'copy' function for data classes and explores two alternatives: KopyKat, a compiler plugin that generates enhanced copy variations, and Arrow Optics, a framework for transforming immutable data using a composable approach with optics. The presentation highlights the benefits and trade-offs of each solution, including performance considerations and the role of code generation via KSP.