We just published another blog post in our series covering the new features and capabilities coming in ReScript v11. This time it’s about how we’ve added type spreads and coercion to records, to make them more ergonomic to work with and let them get some of the conveniences of structural objects.
Check out the blog post and let us know what you think!
I am not sure the impact, but wouldn’t that have consequences on the guarantees of runtime representation of records? (eg. you are not sure there are no extraneous fields when receiving a record).
Especially with interop with JS, in this new model there is no guarantee that there are some extra keys in the object that get’s passed to JS, and no way to enforce this at the type level anymore.
No that’s not what it means.
But it’s legit to expect that’s the meaning given how it’s phrased.
You can’t even add back the same field with the same type.