3 ms·
I have some concrete ideas for how to fix shape types to make them not incremental. Just a matter of finding the time to push the prototype over the line, and d
by jez 5y ago
I have some concrete ideas for how to fix shape types to make them not incremental. Just a matter of finding the time to push the prototype over the line, and do a migration on Stripe's codebase to fix or silence the ensuing errors. It's one of the most requested features for sure, and I think once we implement it Sorbet will feel much better to use, especially in smaller projects and scripts where you don't want to have to define `T::Struct` for one-off data structures.
- jez 5y agotypo past the edit deadline: "not experimental" instead of "not incremental" (I've got incrementality on the mind these days it seems)
- hiphipjorge 5y agoWow that would be awesome! Shapes/Records are definitely the #1 thing I'm missing from moving over from TypeScript. I started thinking about this a bit and I came up with the conclusion that the single biggest difference between structs and shapes is really iterating over keys. I spent some time trying to create structs by which you could iterate over all the keys and all the solutions seemed clunky or inelegant.