Fengzdadi commented on issue #98:
URL: https://github.com/apache/datasketches-go/issues/98#issuecomment-3740736551

   > > Implement ToByteArray() (Java-compatible format)
   > > Implement NewVarOptItemsSketchFromSlice()
   > 
   > I don't know how l look like, but if possible i recommend to follow 
[encoding package](https://pkg.go.dev/encoding) interface. Those methods name 
is more predictable to engineers who are familar with go.
   
   Thanks for the feedback @proost 
   
   You suggested following Go's `encoding` package interface 
(`MarshalBinary`/`UnmarshalBinary`).
   
   I looked at the existing codebase and found two different patterns:
   
   | Module | Serialization Method |
   |--------|---------------------|
   | `kll`, `frequencies` | `ToSlice()` |
   | `theta` | `MarshalBinary()` |
   
   Q: Which naming convention should we follow for `sampling`?
   
   1. `ToSlice(serde)` / `NewXxxFromSlice(data, serde)` - consistent with 
kll/frequencies
   2. `Marshal(serde)` / `Unmarshal(data, serde)` - closer to Go standard
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to