DEV Community

loading...

Discussion on: Golang: Slice vs Array and should I declare my slice size

Collapse
gholami1313 profile image
Mohammad Gholami

Another key difference between them is that arrays always passes by value and slices always passed by reference. It's a reason for better performance while using slices.