Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorbet is backed by Stripe.

Why is it important to be a separate layer that compiles to plain untyped Ruby?





So that it doesn’t have to go through the Ruby development process. Matz doesn’t want it, and even if he did it would take years just to get people to agree on a syntax, much less actually get it implemented and rolled out.

Same reason Typescript was made and we didn’t add types to JavaScript.


Is Sorbet not what you’re describing?

And RBS is officially part of Ruby…


Neither of them integrate annotations into the language. They’re both bolt-ons and it shows, badly. If either of them were good developer experiences one would have caught on. But they’re both way off the beaten path in terms of what engineers expect in a type system and not in a good way.

Type annotations in the language as syntax. Static type checker with an emphasis on inference. Compiles into Ruby so that it integrates with the entire existing Ruby ecosystem, so unlike Crystal as well.

Those are the general features you need/want and why TS caught on and none of the existing solutions hit the mark.


You might find https://blog.jez.io/history-of-sorbet-syntax/ interesting, written by one of the primary contributors to Sorbet.

Sorbet is a bit different from TypeScript because it has runtime type checking, not just static.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: