Nicer Data Transformation with KopyKat and Optics

May 04, 2023 17 min Free

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.