-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
marshal method names are misleading #1248
Comments
I've been mislead in this way. =) I think solving this is important for Mainnet 2. |
I also find myself wanting to express the shape of what's coming out of the CapData. We could solve both ergonomics problems at once with a wrapper that uses @erights 's pattern validation work. E.g.
|
I don't understand. What is this code trying to say? What is it an example of? |
And the composite process from |
That doesn't validate the shape before casting it. It could with a helper that does the unmarshallng (à la In the comment above, |
I actually still don't understand what the code is trying to say. But I did understand all of #1402 and have approved it. Given that, do I still need to understand the code above? If so, lets schedule a conversation. Thanks. |
This ship has probably already sailed, but the names of
serialize
andunserialize
are misleading—they don't actually produce/consume a serialized representation, but rather a CapData structure that in practice is often serialized/deserialized (for real) by means of JSON.{stringify,parse}. They might fairly be calledmarshal
andunmarshal
(cf. https://en.wikipedia.org/wiki/Marshalling_(computer_science) , especially its first reference), but something liketoCapData
andfromCapData
would be even more clear.The text was updated successfully, but these errors were encountered: