4 ms·
it already does
by ok123456 4y ago
it already does
- willlma 4y agoPlease say more. What's your setup?
- teaearlgraycold 4y agoSorbet exists, but it’s worse than what Python offers, which is dramatically worse than what TypeScript did to JS.
- ZephyrBlu 4y agoMy experience with Sorbet has been way better than mypy with Python. Sorbet is way more useful.
- teaearlgraycold 4y agoThat’s good to hear. I only ever tried Sorbet years ago when it was pretty new.
- ZephyrBlu 4y agoOh that's interesting. You mentioned that Sorbet is dramatically worse than TS, but working with a modern RoR/React stack I don't have that opinion. TS is a bit more flexible and expressive than Sorbet, but I find Sorbet very ergonomic even with strict typing. I rarely have to use T.let or T.must. Sorbet's typed data structures like T::Struct and T::Enum are also great.
- aledalgrande 4y agoHave you used tapioca with it? Apart from some edge cases, it makes it very smooth to use once you learn it.
- flats 4y agoRBS (https://github.com/ruby/rbs https://github.com/ruby/rbs) + Sorbet (https://sorbet.org https://sorbet.org) in Ruby 3!
- a-user-you-like 4y agoIt’s… not ready for prime time. I’m optimistic that it can get there but right now the tooling is quite immature and the type system flexibility is not there for such a dynamic language as ruby.
- Rafert 4y agoHave you tried Tapioca (https://github.com/Shopify/tapioca https://github.com/Shopify/tapioca) with Sorbet? Typing in general has ways to go sure, but I find this combination quite usable in my day to day.
- a-user-you-like 4y agoYes, but in dealing with parsing JSON in a dynamic way, we took a bunch of time to try to get things working elegantly and it didn’t go so well. Same with trying to set up a base class for a service object that could return any number of things. Maybe I’ll check back in 3 years? But it seems to be A pet toy of Shopify, and for their needs.