Open tmr232 opened 3 years ago
Thanks!
I think using the word serialize
in the names of these functions clashes somewhat with the rest of capnproto-java, where "serialize" means to go from a MessageBuilder
to bytes.
I don't have a good sense for how generally useful these new functions are. It would help if they had some documentation comments and possibly some tests.
What do you think would be a good name, then?
And anything specific you'd like to see in the test, or just a comparison against the regular-loop version to see that it is equivalent?
What do you think would be a good name, then?
I don't have any suggestions, because I don't have a good sense for the situations in which these functions are intended to be used.
And anything specific you'd like to see in the test, or just a comparison against the regular-loop version to see that it is equivalent?
Mainly I'm interested in seeing explanations and examples of how these functions are meant to be used.
I'm worried that maybe these functions are too specialized to merit a place in the base library. I was hoping that if you provided more context then I would be able to make a better judgment about that.
This is a class of helper functions we use when serializing collections. It takes care of the index manipulation and assures the user that this is only serialization - not a generic loop.
Without the helpers:
With the helpers: