Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
This talk is about the new feature of Ruby 3 for static type checking. The Ruby committer team had a plan to provide an optional static type checker for Ruby 3, but it is changed. Ruby 3 won't ship with a static type checker, but it will provide a feature called RBS to support type checker developments. In this talk, I will explain what RBS is, how the gem helps type tools developments, and what to do to get your gems ready for RBS. Soutaro Matsumoto Soutaro is a lead Ruby engineer at Square working on Steep, RBS, and static typing. He is a core Ruby committer working with Matz and other core committers on the RBS specification that will ship with Ruby 3.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "The State of Ruby 3 Typing" features a presentation by Soutaro Matsumoto, a lead Ruby engineer at Square, discussing the new typing features in Ruby 3. Ultimately, Ruby 3 will include a static type definition language known as RBS and support various type checkers. The following key points are highlighted: - **Introduction to Ruby 3 Typing**: Soutaro explains the developments regarding typing in Ruby 3 and emphasizes that while Ruby 3 will not ship with a built-in static type checker, it will introduce RBS and the RBS gem to aid type checking. - **Static Type Checkers**: Several type checkers are available for Ruby, including Soutaro's own Steep and the widely-used Sorbet. These require users to manually annotate types, whereas TypeProf infers types automatically by analyzing Ruby programs. - **RBS Overview**: RBS is introduced as a new language that defines types for Ruby programs. It allows the specification of classes, modules, methods, and their relationships, enabling static type checkers to work effectively. - **Type Definitions**: An example is provided, demonstrating how RBS can clarify method signatures and variable types in Ruby, leading to better understanding and error detection without runtime execution. - **Flexibility of RBS**: RBS allows for customization through features like generics, union types, and optional types, facilitating flexible type definitions that improve code quality. - **Integration into Libraries**: Developers are encouraged to follow certain guidelines when releasing Ruby gems with RBS files. Two methods are recommended: including RBS files alongside their gem or utilizing community repositories. - **Conclusion**: The presentation concludes that Ruby 3 will significantly enhance its typing capabilities with RBS and various type checkers, encouraging developers to adopt them for better type safety and code maintainability. Soutaro invites feedback and questions regarding RBS and Ruby 3 typing. In summary, the introduction of RBS and supporting type checkers positions Ruby 3 to better serve developers with enhanced static type checking capabilities, leading to cleaner, more reliable code.
Suggest modifications
Cancel