-
Notifications
You must be signed in to change notification settings - Fork 26
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
It's unclear what types Resolve(...)
can return.
#25
Comments
We can't know what it returns though. It can return literally anything. |
It can't, e.g., return a Basically, we need consistent set of primitive types. |
No, it could totally return a peer.ID, or a ProtoNode, or an ethereum
transaction, or anything else really
…On Fri, Sep 1, 2017, 5:28 PM Steven Allen ***@***.***> wrote:
It can't, e.g., return a peer.ID, can it? That is, I assume it can only
return primitives. The problem is that it's unclear what primitives it can
return. See the example in the issue body; CBOR, e.g., encodes integers as
varints but nothing indicates if go-ipld-cbor can return int, int32, int64,
BigInt, float32, or all of the above.
Basically, we need consistent set of primitive types.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL4HIVn6qh0jL4rhCb-u6g9-7bsM9OSks5seKEVgaJpZM4O68HN>
.
|
CBOR also can encode either floating point or normal integers. |
For example, let's say that I'm expecting a number. Should I try casting to a uint64?, float?, etc. We should either provide "canonical" types aliases:
Or return a custom type:
The text was updated successfully, but these errors were encountered: