Ruby typechecker called Sorbet

Ruby typechecker called Sorbet
Average rating: 0
(0 votes)

We’re so excited about the new tool we have found! Sorbet was presented by Stripe team at RubyKaigi at the beginning of summer. This typesystem can be adopted gradually with different teams and projects adopting it at a different pace. It supports ‘And’ and ‘OrTypes’ as well as basic generics. Its type syntax is backwards compatible with untyped Ruby. Take a look at Ruby typechecker called Sorbet!

The last couple years have brought a number of great typecheckers to JavaScript. But now it’s time for Ruby to get one!

Ruby has a reputation for being “magic” — its loose syntax and monkey-patching functionality allows developers to rapidly build powerful applications, but it can also lead to unclear and confusing code. With Sorbet, Ruby developers may have a new opportunity to bring some stability and clarity to their projects.

Sorbet developers team intend to open source the project but haven’t had the resources to split out the Stripe-specific bits and are still focusing primarily on the internal deployment. So, we hope that someday this checker will be available for everybody.

Despite it is currently in beta, some technical details are already named:

  • focus on practicality;
  • the entire thing is designed with nice error messages in mind;
  • local type inference, no need to declare local variables;
  • non-nillable types by default;
  • smart control-flow dependent typing;
  • union and intersection types.

Take a look at Sorbet yourself!

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111