June 29, 2026
No Empty Strings, Plenty of Drama
Type-checked non-empty strings
Coders thought it was TypeScript drama, then learned it was about fancy bag makers and faster builds
TLDR: Bellroy says a new coding trick stops blank text mistakes earlier and cut build times by around 10% in a massive internal package. Commenters were split between genuine praise, confusion over the title sounding like TypeScript, and delight that the company behind the trick mostly sells bags.
A tiny coding trick turned into a surprisingly juicy comment-section soap opera. The actual news: Bellroy — yes, the bags and accessories company — says it found a cleaner way to make sure a text value can never be blank, while also cutting compile time by about 10% in a huge internal data package. In plain English, the team replaced thousands of clunky old code-generation calls with a newer language feature that lets the compiler reject empty text earlier and more neatly. Useful? Definitely. But the crowd quickly made it about something even better: expectations, confusion, and identity crisis.
The strongest reaction was basically, "Wait… what language are we even talking about?" One commenter admitted the title screamed TypeScript sorcery, only to discover it was Haskell instead — and then cheekily suggested the TypeScript version was much simpler. That set the tone: half impressed, half amused, with a side of "classic programmer title bait." Then came the plot twist everyone loved: Bellroy isn’t some obscure software startup, it’s a brand known for bags. That revelation landed like a meme, with readers doing a double take over why a wallet company is deep in advanced programming tricks. Meanwhile, another commenter chimed in with real approval, saying a similar "non-empty string" idea became hugely useful in the PHP world too. So the vibe was a delicious mix of "this is clever," "this title fooled me," and "why is luggage tech so hardcore?" For once, the compiler wasn’t the only one throwing surprises.
Key Points
- •Bellroy described a Haskell technique for enforcing non-empty strings at compile time with a `NonEmptyText` constructor.
- •The implementation uses `RequiredTypeArguments`, introduced in GHC 9.10, to pass a type-level string literal as if it were a value.
- •The article first shows `IsNonEmptySymbol` as a type family that emits a custom error for the empty string, then rewrites it as a typeclass to behave like a normal constraint.
- •The typeclass version uses an overlapping instance for `""` together with `Unsatisfiable` to produce the custom error message "Expected a non-empty string."
- •Bellroy replaced thousands of Template Haskell splices in its internal `bellroy-data` package and reported roughly a 10% compilation-time improvement.