logoalt Hacker News

jweirtoday at 3:24 AM1 replyview on HN

This is our experience. We have added Sorbet to a 16 year old Rails app. It is a big win in avoiding errors, typos, documentation, code completion, fewer tests are required, etc.

And the LLMs take advantage of the types through the LSP and type checking.


Replies

zingartoday at 7:20 AM

I’d love to hear from you or someone in your shoes: what are some patterns or examples of tests that are made redundant by types?

“It has a field of type X” has never been a useful test for me, my tests are always more like:

“if I send message X I get return value or action Y”

… with my admittedly limited experience of types I don’t see how they replicate this.

Therefore it looks like I’d only be “replacing” tests that I’d never write in the first place.

What am I missing?

show 3 replies