Three-Index Slices in Go 1.2

1 · · Dec. 17, 2013, midnight
With the release of Go 1.2, slices gained the ability to specify the capacity when performing a slicing operation. This doesn’t mean we can use this index to extend the capacity of the underlying array. It means we can create a new slice whose capacity is restricted. Restricting the capacity provides a level of protection to the underlying array and gives us more control over append operations. Here are the release notes and design document for the feature request:...