Go Slices Are Fat Pointers

Go Slices Are Fat Pointers

Functions accepting these fat pointers no longer need to accept a count parameter, and they’d generally accept the fat pointer by value. Since the callee modifies the fat pointer, it should be returned:

Congratulations, you’ve got slices! The function could take a slice of the slice, effectively moving the pointer around with pointer arithmetic, but without violating memory safety due to the additional “fat pointer” information.

Source: nullprogram.com