Golang has a "full slice expression" in the form of a[low:high:max], where the third index sets the capacity of the slice.
Slices are a solution to bounds checking for pointers in Golang, and they augment pointers with a length field for easy runtime bounds checking. The capacity of a slice acts as a bounds checker for slice expressions.
The full slice expression reduces the capacity of a slice, restricting it to itself, making it useful for returning a slice from an immutable array.







![a[low:high:max] in Golang](https://cdn.faun.dev/prod/media/public/images/9e9d0211-cd49-4721-854b-231489a.min-735x489.format-webp.webp)








