|
|
|
|
|
by troad
302 days ago
|
|
Ruby is such an elegant language, but the strong and ongoing hostility to any sort of sensible gradual typing is a real mistake. I know that the Ruby community loves its clever runtime metaprogramming, but even the most metaprogrammed codebase is still going to consist mostly of plain old in-out methods. And as anyone who's ever typed a dynamic codebase knows, you pick up so much low-hanging fruit, in terms of edge cases and errors, when you slap some types on those. You don't need to type everything, but there is real hostility in Ruby circles to gradual typing, even where it would make sense and wouldn't impose any major costs. Personally, I've stopped writing Ruby. Short of any pathway to sensible gradual typing, I just can't shake the feeling that every new line of Ruby is instant tech debt. Which is such a shame, since I find real beauty in the language. |
|
I'm not sure what you're basing that on, gradual typing has been built into Ruby since 3.0 (2020). Sorbet can around a bit earlier in 2019.
There is on going work to improve both with RBS-Inline support now in Sorbet with runtime support hopefully on the way.
IRB uses RBS for autocompletion and Solargraph and Ruby-LSP both support it.
I would say there is no hostility to gradual typing in the Ruby community. Quite the opposite, people are being paid to work on it.