Sorbet

Sorbet

  • Get started
  • Docs
  • Try
  • Community
  • GitHub
  • Blog

›Talks

Talks

  • RubyKaigi 2018
  • Strange Loop 2018
  • RubyConf 2018
  • RubyKaigi 2019
  • Curry On! 2019
  • JVM Language Summit 2019
  • RubyConf 2019
  • QCon 2019
  • ParisRB 2020
  • PDX.rb 2020
  • RubyConf 2021
Edit

A practical type system for Ruby at Stripe

Date: May 31, 2018
Speakers: Dmitry Petrashko, Paul Tarjan, Nelson Elhage

  • → Talk page
  • → Video
  • → Slides

Abstract

At Stripe, we believe that a typesystem provides substantial benefits for a big codebase. Types:

  • 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 type system can be adopted gradually with different teams and projects adopting it at a different pace. We support “and” and “or” types as well as basic generics. Our type syntax 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.

Strange Loop 2018 →
  • Abstract

Get started · Docs · Try · Community · Blog · Twitter