At Stripe, we believe that a typesystem provides substantial benefits for a big codebase. They :
- are documentation that is always kept up-to-date; - speed up the development loop via faster feedback from tooling; - help discover corner cases that are not handled by the happy path; - allow building tools that expose knowledge obtained through type-checking, such as "jump to definition".
We have built a type system that is currently being adopted by our Ruby code at Stripe. This typesystem can be adopted gradually with different teams and projects adopting it at a different pace. We support And and OrTypes as well as basic generics. Our type syntax that is backwards compatible with untyped ruby.
In this talk we describe our experience in developing and adopting a type system for our multi-million line ruby codebase. We will also discuss what future tools are made possible by having knowledge about types in the code base.