7 ms·
The learning curve on something like TS for people already conversant in JS is pretty shallow. I think the time invested learning it will pay for itself very qu
by cageface 10y ago
The learning curve on something like TS for people already conversant in JS is pretty shallow. I think the time invested learning it will pay for itself very quickly on any non-trival project.
I wish I had something similar for all the Ruby code I write.
- RX14 10y agoIt's not exactly what you want, but if you want a statically typed ruby-like you should check out crystal (http://crystal-lang.org/ http://crystal-lang.org/)
- cageface 10y agoCrystal looks interesting but I can't really migrate to a new language. Something that compiles down to plain Ruby would be great though.
- chris_st 10y agoYou might want to check out rubocop[1]. It does static checking, and we're pretty happy with it. 1: https://github.com/bbatsov/rubocop https://github.com/bbatsov/rubocop
- RussianCow 10y agoDoes it actually do static type checking? Because I don't see anything about types in the documentation. It looks like just a more sophisticated linter, which is very different from what TypeScript and Flow bring to the table.
- chris_st 10y agoAh, you're right. It's "just" a linter... but a pretty good one.
- cageface 10y agoI started using rubocop earlier this year and I've become a huge fan. It's done a lot to improve the quality of my code and the consistency of code on projects with multiple developers.
- mendelk 10y agoNot sure if this will do, but there's Contracts for Ruby: https://github.com/egonSchiele/contracts.ruby https://github.com/egonSchiele/contracts.ruby