3 ms·
> I am not convinced of the utility of how good type annotations are in the long term. Anecdata: adding typing (via Sorbet, then RBS) to multiple projects over
by lloeki 3y ago
> I am not convinced of the utility of how good type annotations are in the long term.
Anecdata: adding typing (via Sorbet, then RBS) to multiple projects over the years uncovered many corner case (and not-so-corner case but non obvious) bugs, some subtle but critical, before they ended up crashing production.
I can vouch with real life experience that it is useful. RBS+Steep is so useful I inadvertently found myself† beginning to write type-first, describing my code in .rbs files then filling in the implementation. Thinking in types has helped me uncovered issues right at the idea stage when I could have produced a smart^Wfatally flawed implementation that would still work thanks to Ruby's dynamism (mind you, Ruby's dynamism is great, it is merely a tool to be wielded at appropriate times)
† Which is kinda useful as a "ok this thing works" rule of thumb in my book