Nicer data transformation with KopyKat and Optics
summary
Concrete tradeoffs and runnable techniques: KopyKat is a compiler plugin that gives a mutable scope API but implements it by code generation via KSP that effectively doubles data-class size and must copy and freeze nested objects at runtime, so expect measurable allocation cost. Arrow Optics generates field optics (also via KSP), composes lenses/prisms like every.list to target collections, and focuses on composable transformations rather than mutable-scope convenience.
AI-written summary · about
chapters (5)
- 0:00The immutability challenge
- 2:36Introducing Copycat
- 4:21Exploring Arrow Optics
- 7:18Future improvements
- 8:52Q&A and closing
related talks
33mMeta-programming with KSP and Kotlin compiler plugins
40mArchitecting Typed FP Applications & Libraries in Kotlin with Arrow
38mKSP and Plugins. Optimizing Kotlin Multiplatform common code
50mState of the functional ecosystem in Kotlin: Mid 2018 checkup
37mWhy you should positively consider introducing and migrating to KSP
39mKotlin for the Pragmatic Functionalist
15mOn the Applicability of Annotation-Based Source Code Modification in Kotlin (Work...
26mBuild your own compiler with KSP
