5 ms·
I work in a large Sorbet codebase (though it isn't a Rails one) and it's a huge boon IMO. The number of tests we don't need to write because of Sorbet is really
by __float 9mo ago
I work in a large Sorbet codebase (though it isn't a Rails one) and it's a huge boon IMO. The number of tests we don't need to write because of Sorbet is really nice.
It does occasionally require structuring your code differently, but I find the type-system-encouraged approach often gives a more elegant and harder-to-misuse interface in the end.
- prh8 9mo agoYou work in a large Ruby codebase that _isn't_ Rails?! Are you hiring??
- ezekg 9mo agoI was assuming Stripe, but would love to hear of others!
- zingar 9mo agoVery curious to hear about the specific cases where types make tests unnecessary. I spend my working life swapping between Ruby and typescript projects and the typescript project is utter garbage with poor test coverage that needs a day of human QA for every build whereas the Ruby project is well tested such that we know that CI passing means it’s good to be released.
- qaisjp 9mo agoTypes don't make testing in general unnecessary, but it removes a class of error handling that runtime type checking handles for you. You can really trust the types when using Sorbet. (I also work in a 40m+ loc non-rails ruby codebase that is almost entirely typed with Sorbet.)
- zingar 9mo agoHaha “tell me you work at Stripe without telling me you work at Stripe”