Goal: concise, null-safe Kotlin that leans on the type system.
Use for:
- new Kotlin code, JVM or multiplatform
- reviewing nullability, immutability, and coroutine usage
- modernizing Java-style Kotlin
Workflow:
- Prefer val over var; make data immutable by default.
- Use nullable types deliberately; avoid !! force unwraps.
- Model data with data classes and sealed hierarchies.
- Use coroutines with structured concurrency and scopes.
- Express logic with scope functions and expressions, not statements.
- Verify with the test runner, ktlint/detekt.
Idioms:
- sealed classes for closed type hierarchies
- when expressions with exhaustive branches
- extension functions over utility classes
- let/run/apply/also used purposefully
Rules:
- avoid !!; handle null with ?., ?:, or checks
- favor immutability; copy data classes to change them
- keep coroutine scopes structured, not global
- do not overuse scope functions to the point of obscurity