Type Checking Ruby Programs with Annotations
summary
Type inference for real Ruby programs proves infeasible without help so the solution implemented is a gradual static checker called Steep available on GitHub and as a gem that combines local type inference with structural subtyping and a separate signature language for libraries and monkey patches. It requires explicit signatures for many core classes, reduces annotations for locals, and accepts tradeoffs (cannot fully infer polymorphic builtins). The tool type checks annotated code and works in practice but needs community-written signatures to scale.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:21Why type check Ruby
- 6:17Past type checking attempts
- 13:16Limitations of current approaches
- 16:16Relaxing type checking requirements
- 18:03Runtime type checking
- 21:03Introducing Steep
- 31:54Steep's type system
- 32:47Q&A
related talks
53mAn introduction to typed Ruby programming
36mAn introduction to typed Ruby programming
37mChecking Your Types: An Overview of Ruby's Type System
37mTypes and Ruby Programming Language
43mType Checking Ruby
36mA Static Type Analyzer of Untyped Ruby Code for Ruby 3
32mThe State of Ruby 3 Typing
39mGradual typing of Ruby at Scale
