Right now the Cid type is:
type Cid struct {
version uint64
codec uint64
hash mh.Multihash
}
The internals are not exposed but it is expected to be passed around by pointer which in a way exposes some of the implementation details. For example in #3 I suggested we use a more compact structural representation and I think @Stebalien is suggesting to a serialized string instead. The best representation may be debatable, but either change will require that the Cid no longer be passed around by a pointer. We may even decide that a Cid is better represented by an interface and some point.
So for now may I suggestion that we start passing around the Cid type directly and change the representation to.
type Cid struct {
*cid
}
type cid struct {
version uint64
codec uint64
hash mh.Multihash
}
This will then give us the freedom to try different internal representations without making requiring any API changes.
@whyrusleeping @Stebalien thoughts?
Right now the Cid type is:
The internals are not exposed but it is expected to be passed around by pointer which in a way exposes some of the implementation details. For example in #3 I suggested we use a more compact structural representation and I think @Stebalien is suggesting to a serialized string instead. The best representation may be debatable, but either change will require that the Cid no longer be passed around by a pointer. We may even decide that a Cid is better represented by an interface and some point.
So for now may I suggestion that we start passing around the Cid type directly and change the representation to.
This will then give us the freedom to try different internal representations without making requiring any API changes.
@whyrusleeping @Stebalien thoughts?