Past, Present, and Future of Sorbet Type Syntax
I gave a talk at the SF Bay Area Ruby Meetup in April 2025 about the history of Sorbet’s type syntax. The abstract of the talk:
No one loves Sorbet’s type syntax, but it’s still the only way to annotate types alongside Ruby source code (comments not included). By contrast, RBS annotations live in separate files, making them difficult to use for anyone enthusiastic to adopt type—people turn to Sorbet largely in spite of its syntax.
Why does
sig
take a block? Why do some types useT::
and some types useT.
? Why do Sorbet type annotations feel so verbose? How did it end up like this?We’ll answer these questions and more. Starting from before Sorbet existed, we’ll proceed through the history and circumstances which influenced Sorbet’s type syntax, discussing the principles guiding the design. We’ll end with some ideas for the future, both for Sorbet and the wider typed Ruby ecosystem.
Unfortunately, the audio quality in the recording below is particularly poor. If you happen to work at Stripe, I gave this same talk as an internal “lunch and learn” tech talk that you should be able to find from the internal Tech Talks page, which has better audio quality.
I also turned my script for the talk into a blog post:
→ Past, Present, and Future of Sorbet Type Syntax
Otherwise, I hope to be able to re-present this talk to get something with better production quality. If you’d like me to present this talk at your event, please reach out.