Hacker News new | ask | show | jobs
by jitl 3340 days ago
What!? There are libraries available that do static type inference on Ruby. Although the language is rather dynamic, it's in no way an intractable problem, or even one that requires a PhD in Ruby Bullshit.

Here are some libraries that could contain that one-in-a-billion knowledge:

- RDL: type annotation, but also has a static type checker. https://github.com/plum-umd/rdl#static-type-checking

- Typed: gradual typing system, with type inference https://github.com/antoniogarrote/typed.rb

- Jetbrains has something, too: https://github.com/JetBrains/ruby-type-inference

1 comments

Thanks. I am on your side and have been a Ruby fan since 2005. I'm trying to throw money at building better Ruby tooling. :)

I'm familiar with those projects, but when I last tried them, they did not work well enough with some additional constraints that the nature of our product imposes (chiefly requirements for error-tolerance and cross-project resolution), and we weren't able to find people to help us. I will try them again and see if we can sponsor someone now to help integrate when with Sourcegraph, since it looks like quite a bit of progress has been made in the last few months.