Sorbet's Ugly Syntax: A Necessary Evil for Ruby Type Checking?

2025-05-09

Sorbet, Stripe's Ruby static type checker, has a famously clunky syntax. In this talk, Jake explains the trade-offs behind Sorbet's design choices. While the syntax isn't pretty, semantics (what the types mean) are arguably ten times more important. Sorbet wasn't built to force static typing, but rather to address Stripe engineers' needs for improved productivity and code maintainability. The talk traces Sorbet's history, exploring various design approaches before settling on a DSL extension of existing Ruby. Future improvements are discussed, including refinements to the current syntax and integration with Ruby's RBS standard, aiming for greater ease of use and power.

Development Static Type Checking