Re:Ruby 3.2.0 Is from Another Dimension
by revskill on Wednesday January 04, 2023 @03:09AM
(#34243252)
What's status of static typing checking ?
[ Parent
| on HN ]
Sorbet[1] is currently the most robust tooling available. It has a few rough edges and limitations but it otherwise works great for 90% of use cases.
[1]: https://sorbet.org
Oh lovely, there's this morning wasted :)
Re:Ruby 3.2.0 Is from Another Dimension
by aledalgrande on Wednesday January 04, 2023 @04:48AM
(#34243811)
Add tapioca and it's much smoother
Re:Ruby 3.2.0 Is from Another Dimension
by berkes on Wednesday January 04, 2023 @05:18AM
(#34243988)
But Sorbet is also not part of the language, not part of the std-lib, and AFAIK there aren't plans to make it that.
Progress is really good, in this RubyKaigi talk there’s a great demo showcasing the official rbs with vscode integration https://youtu.be/4E4TRgMDYqo
Re:Ruby 3.2.0 Is from Another Dimension
by Alifatisk on Wednesday January 04, 2023 @06:01AM
(#34244218)
RBS is still suggested, but have you tried the Contracts gem?
Re:Ruby 3.2.0 Is from Another Dimension
by Fire-Dragon-DoL on Wednesday January 04, 2023 @04:46PM
(#34252249)
A disaster so far. We tried using Sorbet for a component and we hit ab edgecase where we had to completely remove it. There is a lot of undocumented stuff, conflict between the right tooling and specifically for Sorbet, the lack of structural typing for a language like Ruby (you know, duck typing), makes it very unsuitable, nowhere near Typescript.
When we tested, there was barely an experimental type checker for RBS, that was 1 year ago.
Overall, we tried, had to bail out and stick to YARD. Horrible experience.