Checking Your Types

Checking Your Types

"Checking Your Types: An Overview of Ruby's Type System" was the first conference talk I've ever given, which was prerecorded and premiered at Ruby Day Italy 2021. Below are the slides and some external links to tools and references that were a part of writing the talk.


Tools

My talk focused on the new features in Ruby 3, and mentioned the type checkers linked below. The example code was checked using Steep.

Ruby 3.0.0 Released
soutaro/steep
Static type checker for Ruby. Contribute to soutaro/steep development by creating an account on GitHub.
Sorbet
Sorbet has 6 repositories available. Follow their code on GitHub.

References

Below is a list of bookmarks to works that I referenced as a part of learning about type systems, Ruby and Ruby's type tools. I hope that it provides a good starting point for any deeper reading you'd like to do into the topics my talk mentioned!

Ruby is dynamically AND strongly typed | Ruby Fleebie
Idiosyncratic Ruby: Static Monkeys vs. Strong Ducks
Documenting All Ruby Specialities.
Type Checking in Ruby — Check Yo Self Before You Wreck Yo Self
A splash into Duck Typing, gradual typing and enjoying Sorbet on a typical summer day
Climbing Steep hills, or adopting Ruby 3 types with RBS — Martian Chronicles
A deep dive into adding Ruby Type Signatures to existing projects and using Steep to perform type checking.
The State of Ruby 3 Typing
Introducing RBS, Ruby’s new type signature language
Types in Ruby 3, RBS, and Sorbet · Sorbet
Yesterday Square [posted an article][introducing-rbs] to their blog introducing
Type systems and checking in Elixir and Ruby
Adding type checking to dynamically typed languages is possible, and awesome!
A Type of Programming
Algebraic data type - Wikipedia
Parse, don’t validate
Historically, I’ve struggled to find a concise, simple way to explain what it means to practice type-driven design. Too often, when someone asks me “How did you come up with this approach?” I find I can’t give them a satisfying answer. I know it didn’t ju...
Types as axioms, or: playing god with static types
Just what exactly _is_ a type? A common perspective is that types are _restrictions_. Static types restrict the set of values a variable may contain, capturing some subset of the space of “all possible values.” Under this worldview, a typechecker is sort...
Confident Ruby
We improve the lives of professional developers. We create timely, practical books on classic and cutting-edge topics to help you learn and practice your craft, and accelerate your career. Come learn with us.

Comments