Modeling Domain State with Kotlin Sealed Classes and Interfaces
Kotlin sealed classes and interfaces model finite domain states with compiler-checked exhaustive when expressions. Covers syntax, serialization, sealed interfaces for multiple inheritance, and production trade-offs: binary compatibility, DEX count, R8 stripping.