slices: grow should document zeroness of extended elements #56086
Labels
Documentation
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
In the event that
Grow
grows a slice, what assumptions are we allowed to make about the zeroness of the added elements? The current implementation guarantees that they are zero. Can we document that fact?I have a loop that looks something like:
As an optimization it relies on
slices.Grow
extended the slice with zero elements, but this is not a documented guarantee.\cc @ianlancetaylor
The text was updated successfully, but these errors were encountered: