Sorbet first came on the scene almost a year ago, so this post isn't really news.
But having not really gone into depth about how it actually works, I really enjoyed this podcast episode about how it works.
Basically it is a gradual typing system designed for uneven adoption because that is what was needed at Stripe, and this makes it really appealing to adopt on an as-needed basis in a codebase based on individual team preferences and problems.
This repository contains Sorbet, a fast, powerful typechecker designed for Ruby It aims to be easy to add to existing codebases with gradual types, and fast to respond with errors and suggestions.
This README contains documentation specifically for contributing to Sorbet. You might also want to:
- Read the public Sorbet docs
- Or even edit the docs
- Watch the talks we've given about Sorbet
- Try the Sorbet playground online
If you are at Stripe, you might also want to see http://go/types/internals for docs about Stripe-specific development workflows and historical Stripe context.
Table of Contents
- Sorbet user-facing design principles
- Learning how Sorbet works
- Building Sorbet
- Running Sorbet
- Running the tests
- Testing Sorbet against pay-server
- Writing tests
The whole thing seems quite well thought out and useful, and the pattern of starting with type-free Ruby for prototyping and then moving to typing once business logic starts to congeal seems great.