Hi Vladimir, thanks for your article. In the current state I don't think I'd adopt it either. To be honest I'm not sure it's going to scale easily considering how most Rails apps load tons of gems full of metaprogramming and DSLs.
Stripe AFAIK does not use Rails, Sorbet should be easier in a Ruby-only project.
A few comments:
I hope this will change in the future. The raw size (w/o .git/) of rubanok increased by 2.1MB, from 124KB to ~2.2MB.
2 Megabytes for a small library... It's probably a fixed increase of size though, I don't think it's directly proportional to how many signatures or definition files.
Problem #1. Unsupported features.
I think this is the same problem the Javascript community had when trying TypeScript. The type checker needs to evolve with the language and AFAIK there's no formal spec of Ruby so you have to track each change manually anyway.
BTW I didn't know Sorbet is written in C++
Problem #2. Limitations of flow-sensitivity
You did a lot of wrangling there. It's the thing that annoys me from these checkers, the time spent to make the tool happy
Problem #3. Signatures vs modules.
Can I say that this signature looks ridiculous? I'm thinking of the cognitive complexity that adds for devs at all levels.
So everyone is now shopify or [insert random company xyz]?
I mean there is a reason why this abomination has been created by a COMPANY. At the least they finally open sourced it - it was ludicrous that they promoted it while it was closed source.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Vladimir, thanks for your article. In the current state I don't think I'd adopt it either. To be honest I'm not sure it's going to scale easily considering how most Rails apps load tons of gems full of metaprogramming and DSLs.
Stripe AFAIK does not use Rails, Sorbet should be easier in a Ruby-only project.
A few comments:
2 Megabytes for a small library... It's probably a fixed increase of size though, I don't think it's directly proportional to how many signatures or definition files.
I think this is the same problem the Javascript community had when trying TypeScript. The type checker needs to evolve with the language and AFAIK there's no formal spec of Ruby so you have to track each change manually anyway.
BTW I didn't know Sorbet is written in C++
You did a lot of wrangling there. It's the thing that annoys me from these checkers, the time spent to make the tool happy
Can I say that this signature looks ridiculous? I'm thinking of the cognitive complexity that adds for devs at all levels.
I agree when you say that the tool should move the signatures away from the code, or at least have a switch that can do that.
Code is read much more than it's written.
7% of CPU overhead is a lot for an already slow language. Stripe has a ton of VC money, they can just scale up the machines :D
:((((
Thanks for the comment!
Yep. But we also have Shopify, an early adopter/beta user of Sorbet. We haven't heard a lot about this adoption yet though.
And there are already some tools to make it easier to integrate with Rails: github.com/chanzuckerberg/sorbet-r....
So everyone is now shopify or [insert random company xyz]?
I mean there is a reason why this abomination has been created by a COMPANY. At the least they finally open sourced it - it was ludicrous that they promoted it while it was closed source.