Forem

Cover image for Static Type Checking in Ruby Video Series
Ben Greenberg for Vonage

Posted on

4 2

Static Type Checking in Ruby Video Series

Ruby is a traditionally dynamically typed language. It is one of the reasons many Ruby developers love working with the language. Yet, static type checking is coming to Ruby, and with it comes many opportunities to make our code more explicit, more thoroughly understood by future developers and more resilient.

Sorbet is an open-source gem that introduces static type checking to your existing codebase incrementally. It lets you reduce the pain in the process by gradually increasing the severity of the check you run. Using the sigil # typed: you can designate a precise level of check, or none at all, on each file in your codebase.

In this three-part series, we walk through the first steps in introducing Sorbet to your code. Part 1 will take you through installation and initialization of the gem. Part 2 will take you through running the first code quality checks. Part 3 will introduce the first method signatures and run the first checks on types.

Part 1: Initializing Sorbet

Part 2: Running the First Checks

Part 3: Introducing Method Signatures

The state of static type checking in Ruby is a constantly evolving one. A solution now might not be applicable down the road as new approaches are developed. This is an exciting space to keep on watching and developing in.

Are you working with static type checking in Ruby or in another traditionally dynamically typed language? How has it gone for you? What have you experienced?

Ruby Minutes is a new video series from Nexmo that looks at new and interesting things in the Ruby ecosystem. Have a topic you'd like us to feature? Let us know! We'd love to hear from you.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay