Static Typing in Ruby 3 Gives Me a Headache (But I Could Grow to Like It)
Here’s my grand unifying theory of Ruby 3 type checking:
- You write YARD comments in your code.
- You install Solargraph for the slick editor features.
- You install Sord to generate .rbs files.
- You install Steep to type check your Ruby code.
Nice theory, and extremely similar in overall concept to all the folks writing JavaScript yet using JSDoc to add “TypeScript” functionality in their code editors and test suites.
Unfortunately the reality is…not quite there yet. It kinda sorta works—with several asterisks. Hence the reason it took me so long to even write an article about Ruby 3 typing…and I’m not even sharing examples of how to do it but instead my thought process around why you’d want to do it and what the benefits are relative to all the hassles and headaches.
Intrigued? Continue reading…
(and then hop over to DEV.to to leave your comment!)
Oh and a very happy March to you, fellow Rubyist!
’Till next time,
Jared
Don't miss what's next. Subscribe to Fullstack Ruby: