5 ms·
No mention of Sorbet. Is anyone (outside of Stripe, Shopify, etc) using it?
by rattray 3y ago
No mention of Sorbet. Is anyone (outside of Stripe, Shopify, etc) using it?
- danielheath 3y agoWe gave it a good shot at work. It really struggled with common dynamic idioms in rails, like “find” being able to return either an array or a single value. The combination of verbose type definitions and limited support for the kind of types rails often uses made it a poor ROI for us, but it did find some bugs.
- mportela 3y agoI use it at Justworks and love it! Packwerk [1] is another personal favorite [1] https://github.com/Shopify/packwerk https://github.com/Shopify/packwerk
- kamikaz1k 3y agoUsed at Instacart; its a very polarizing topic. Personally don't like it, but I also don't like mypy. I do like TypeScript though, mostly.
- chihuahua 3y agoWe're using it (300 engineers, 50k .rb files). It sucks, like everything else related to Ruby. It's ugly and hard to read. It would be better to use a real language that has types built in. When you're hacking together an MVP as quickly as possible, it may seem like a brilliant idea to not have types. Then you have a real company and a larger team and you find out that not having types causes lots of problems. Then you graft an ugly hack like Sorbet onto your code base. It's more work and more error-prone than having a real language with types. The official Ruby motto should be "penny-wise, pound foolish". Everything about the language is a disadvantage when you have a large code base.
- pftg 3y ago> find out that not having types causes lots of problems Yeah, it's hard to find a decent team, so we work with less experienced guys who need a lot of safeguards like static types ;) Ruby solves this problem: you do not need big teams, so you are more comfortable finding better developers. Ruby allows to reduce team 5x.
- lloeki 3y agoNor of RBS and Steep, the latter which has a LSP.
- drwl 3y agoGusto adopted it when I was there (I left at the end of 2022). Like other comments, it's a bit polarizing but I found it to be useful when working in large codebases because you one didn't have to reason about return types and could just read them from function signatures. Getting it to play nicely with Rails and other gems that did metaprogramming magic was a constant pain in the butt though.
- hamandcheese 3y agoFlexport (no longer employed there) adopted it in a 1M+ loc ruby app, and achieved relatively high type coverage surprisingly fast. Can't remember the exact numbers but it felt most code I touched was strongly typed. I would say it was immensely worth it. It caught bugs for me before runtime on a daily basis, and enabled refactors that would have been so much more difficult without it. It was far from painless, and there were plenty of outstanding issues even when I left. But I consider it an invaluable and essential tool for any large ruby codebase. I was particularly impressed at how fast sorbet was. Way faster than typescript on a comparably sized codebase.
- pftg 3y agoNo, it's an additional tool only for big legacy projects! TDD is much simpler and safer.