4 ms·
Sure, this is an advantage that Typescript has, but it doesn't explain Ruby's lagging progress compared to Python and PHP. Some of that can probably pinned on
by letmeinhere 4y ago
Sure, this is an advantage that Typescript has, but it doesn't explain Ruby's lagging progress compared to Python and PHP.
Some of that can probably pinned on the greater dynamism of Ruby, making all manner of static analysis quite challenging.
But from what I've seen, it seems like the main reason is indifference or even mild hostility from the language maintainers. It looks a lot like they saw Sorbet taking off and slapped together a competing spec (without any associated tooling) that would ensure all type information stays outside of the `.rb` file.
It seems like the only impact it has had is to dissuade people who would like some static types from adopting it, in favor of this vaporware. Contrast this with Python's embrace gradual extension of mypy type hints.
I'd love to be proven wrong, that there are thriving projects building atop RBS. I'd still _prefer_ a system that allowed me to type a function signature so that anyone inspecting it could immediately know its shape, but at least the shadow types would be _something_.
- michaelcampbell 4y agoI've seen more than one ruby dev proclaim they specifically don't want types; if you want a language that has it, there are plenty to choose from. My take here is that typed-ruby is something SOME people want (I'm one), but a lot don't. I'm not sure what level of force that provides to anyone who has either tried or is considering adding it to the language.
- treis 4y agoI agree that Sorbet is a better solution but it's also a breaking change. It's a relatively small breaking change and, IMHO, would have been more than worth it but alas it was not my decision to make.