-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed as not planned
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.Proposalv2An incompatible library changeAn incompatible library change
Milestone
Description
The BinaryMarshaler API returns a freshly allocated byte slice. This makes it unadvisable to implement for high performance APIs, or even APIs that could happen to be used in high performance scenarios.
If it had an append-like API (MarshalBinary([]byte) ([]byte, error)
) then also a lot of high performance and internal parsing operations could be BinaryMarshaler implementations, allowing more standard interface reuse.
The usability is not much worse, as nil
can be passed to get the exact same behavior, and there's precedent in hash.Hash.Sum
.
mark-rushakoff, ericlagergren, bcmills, smasher164, carleeto and 6 morecristaloleg
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.Proposalv2An incompatible library changeAn incompatible library change