Kotlin Mysteries found from years working with Kotlin
summary
Shows six concrete Kotlin-on-JVM surprises with Spring: database rows mapped into Kotlin objects let a non-nullable becoming null (forcing data migration and late NullPointerExceptions during DTO conversion), inline/crossinline decompilation differences and how crossinline prevents non-local returns, tailrec compiles into an iterative while loop with mutable locals, annotation site-target rules make validation annotations apply to constructor parameters not fields (breaking Spring validation), and delegate-targeted annotations require different validators; demos use Spring, PostgreSQL, and bytecode decompilation.
AI-written summary · about
