9/19/2023 0 Comments Rubymine sorbet![]() ![]() I feel like ruby community from the start has always been pretty committed to making it a reasonably possible DX to develop without a a full IDE, with just a text editor (ideally with syntax highlighting, sure). And I believe that rbs is only a plugin away from allowing "in-line typing" in the IDE which will in the background backfill the respective rbs files. Moreover, rbs solved the whole "type readability" problem with lsp plugins. Where could we be now, as a community, if stripe would have fulfilled their promise of supporting rbs notation in sorbet? I'd like to believe that the missing tooling I mention earlier would be here by now already, and with some ruby enterprise backing, the community would have stopped saying "ruby does not need types" a long time ago. For instance, stripe, and to some extent shopify, seem to have constrained the ruby they write to accommodate to what can be expressed in sorbet notation, and have their own lsp plugins. While we're still arguing about "to inline or not to inline", there are still a lot of fundamental ruby features which can't be expressed neither in rbs nor sorbet. While this is not a perfect solution in itself, it scales a bit better than the whole tapioca "let me try to type your gems for this project again" way (unless there's a similar centralised repo with rails definitions?).īut really, the problem is not having a converged community around types. The second problem (dependencies being a nightmare) is currently being solved in the rbs community by having a metarepo, gem_rbs_collection, export type definitions from known 3rd party gems who themselves don't want the burden of supporting types (because tooling is immature, or maintainers are old men). ![]() Moreover, rbs solved the whole "type readability" problem with lsp plugins, both via steep and typeprof, which show typed variables in a similar way to the one the article's author exemplified in the c# example. For instance, sorbet defines rbi notation as "out of source" definitions for 3rd party gems, so essentially, the same as rbs. It seems that both communities think that they represent two opposite views. The main problem IMO is that the 2 first factions can't coalesce. About the rest, I believe that they are consequences of the true elephant in the room: that there are 3 factions in the ruby community, the ones using sorbet, the ones adopting rbs, and the old men yelling at types to get off their lawn (which is my interpretation of the 3rd problem). I share the same opinion about the first point: sorbet annotations are indeed too convoluted, and eliminate readability. It's definitely an interesting opinion about sorbet in particular. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |