unknown-not-a-valid-score

Installation
SKILL.md

"Could not parse" is not a value

Every fallback in a parser answers a question the caller will ask later. ?: 0 answers "how many" with a number that means both zero of them and the parser gave up. ?: "" answers "which one" with a string that means both none and unreadable. The two meanings then travel together through every consumer, and each consumer has to guess — differently.

There are only three honest fallbacks:

  1. A sentinel the success path can never produce — a negative where the domain is non-negative, MAX_VALUE where the domain is a real measurement.
  2. Absence in the typenull, or an Unknown case in a sealed hierarchy.
  3. No fallback at all — fail the parse and let the caller decide.

Absence in the type is the one that cannot be misread, because the compiler makes every consumer say what it wants to happen. Reach for a numeric sentinel only where a nullable type is genuinely not available — a database column, a fixed-width protocol field, an interface you do not own.

Traps

Installs
2
GitHub Stars
35
First Seen
6 days ago
unknown-not-a-valid-score — maxrave-dev/kotlin-footguns