Articles

Sealed Interface vs Sealed Class: When the Distinction Matters

Understanding the Boundary Between Sealed Interfaces and Sealed Classes If you’re building a well-typed Kotlin codebase, you’ll encounter moments where you need to restrict which types can inherit from a base type. Sealed classes have been the go-to for this for years, but Kotlin 1.5 introduced sealed interfaces — and they’re better in subtle but […]

, , , , ,