Home / Companies / Semaphore / Blog / Post Details
Content Deep Dive

Ease Into Ruby 3’s Static Typing Powers With RBS, TypeProf and Steep

Blog post from Semaphore

Post Details
Company
Date Published
Author
Alex Braha Stoll, Dan Ackerson
Word Count
3,137
Language
English
Hacker News Points
-
Summary

The article provides an exploration of Ruby's new type language, RBS, introduced with Ruby 3.0, which aims to enhance Ruby's dynamic nature by allowing static type checking. While RBS specifies type usage, it doesn't perform static type checking on its own, a task supported by community tools like TypeProf and Steep. The article explains the process of using these tools to generate type signatures and perform type checking, illustrating with a Ruby program that calculates working days. It emphasizes the importance of manually refining generated type signatures for effective type error detection and discusses the application of RBS in large codebases or complex systems to improve reliability. The article encourages experimentation with RBS and associated tools for those interested in integrating gradual typing into Ruby projects.