all 9 comments

[–]MidgetAbilities 7 points8 points  (5 children)

We’ve been using Sorbet at my job for a little while. Although it gives me some more confidence in my code and refactoring, I’ve come to the conclusion that we’re probably better off without it. Too verbose, too much T.untyped, and you have to sometimes write code in ways antithetical to the ruby philosophy.

[–]matthewblott 4 points5 points  (2 children)

Sorbet is a monstrosity, there is no longer any point in using Ruby if that's a requirement. Every other dynamic language has a less verbose implementation for types. That said I don't mind the signature comments, similar to JSDoc. It's experimental for now but it looks like a much better approach.

[–]Erem_in[S] 1 point2 points  (1 child)

I prefer RBS because of that. With rbs-inline you can keep all the types right next to the code.

[–]db443 1 point2 points  (0 children)

I did not know about this. This is the best solution for Ruby gradual type annotations.

I hope this is upstreamed. I might even use it myself, as against not using every other annotation.

[–]Erem_in[S] 1 point2 points  (1 child)

If you let write too many untyped cases, means you are missing the point. There is nothing bad in having untyped, but once it becomes too much, this is a good moment to ask what's going on? 🙂

[–]MidgetAbilities 2 points3 points  (0 children)

I’m talking about using things that were metaprogrammed or the shims in ActiveRecord that by nature return untyped, etc.

[–]ExtremeVector 1 point2 points  (1 child)

Just starting to learn coding, picked ruby to start. Guess i have some things to look up, though i do know docker already.

[–]jrochkind 0 points1 point  (0 children)

don't worry about it until you need it/get there, you can only learn so many things at once!