3 ms·
> Though I suspect under the hood the len and cap are ordered first. A slice is stored in memory as a `reflect.SliceHeader` https://golang.org/pkg/reflect/#Sl
by LukeShu 6y ago
> Though I suspect under the hood the len and cap are ordered first.
A slice is stored in memory as a `reflect.SliceHeader` https://golang.org/pkg/reflect/#SliceHeader https://golang.org/pkg/reflect/#SliceHeader ; the pointer does come first.