DEV Community

Discussion on: Sorbet: A Type Checker for Ruby

Collapse
 
rhymes profile image
rhymes

I wonder how rubyists on DEV feel about the project. What say you devs? Yay or nay?

Too soon to have an opinion? :D

Collapse
 
nickytonline profile image
Nick Taylor

PR is already up LOL. I converted the entire ruby code base of DEV to Sorbet. 😜

Collapse
 
k776 profile image
Kieran Pilkington • Edited

I'd love to see how you got Sorbet to work with Rails. I just tried and it didn't pick up any of the columns on the models, so I had 1000s of errors (method not found when calling model columns). I couldn't find any documentation or any quick way to fix.

Thread Thread
 
nickytonline profile image
Nick Taylor • Edited

I was kidding about the PR. 😉 I'm still pretty new to Ruby.

Thread Thread
 
palkan_tula profile image
Vladimir Dementyev

There is a gem which create RBI files for ActiveRecord and URL helpers: github.com/chanzuckerberg/sorbet-r...

Thread Thread
 
willisplummer profile image
willis plummer

up until yesterday the sorbet-rails only supported Rails 5.2 -- but 0.2 release also supports 5.1 .. if you were having issues using it, i'd recommend bumping the version and tryin again

Collapse
 
rhymes profile image
rhymes

LOL

Collapse
 
nickytonline profile image
Nick Taylor

Il reword it to how to ruby devs feel about types in their code. 😎

Collapse
 
rhymes profile image
rhymes • Edited

I feel the same as I feel about adding static typing to other high level dynamic languages (see mypy for Python for example) that weren't designed with static typing in the first place: meh.

I'm not for it, nor against it.

In a "philosophical" sense one of the main choices a developer has when picking a language is if they want static or dynamic typing.

Typing annotation for dynamically typed languages feels both a patch and a useful addition, hence my meh.

I agree with @6temes here when he says that mindlessly adding types to bad code base does not improve such code. It makes the tool happy though, but that's another argument which is more about code quality and software design than typing.

Thread Thread
 
bizzibody profile image
Ian bradbury

:thumbs

Collapse
 
6temes profile image
Daniel

☝ This.

Being the first to use some technology very rarely will give a competitive advantage to your company.

But, I am happy that people are trying static types in Ruby, so the rest can learn if it's worth it or not. ;)