empty-sentinel-instance

Installation
SKILL.md

A canonical empty instance instead of a nullable field

A state holder that starts before its data arrives has to represent "nothing yet". The nullable version pushes that decision into every consumer; a sentinel answers it once, at the model:

// adapted
data class Item(
    val id: String,
    val uri: String?,
    val metadata: Metadata,
) {
    companion object {
        val EMPTY = Item(id = "", uri = null, metadata = Metadata.EMPTY)
    }
}
Installs
2
GitHub Stars
35
First Seen
6 days ago
empty-sentinel-instance — maxrave-dev/kotlin-footguns