Type-Safe Zero-Cost Wrappers with Kotlin Value Classes
The Problem: Primitive Obsession You’ve probably seen this pattern in production code: database IDs represented as Long, user emails as String, currency amounts as Double. On the surface, it’s simple and pragmatic. But it introduces a subtle bug vector—primitive obsession. Imagine you have a function that accepts a user ID and a post ID, both […]


