Categories


Archives


Recent Posts


Categories


GoLang: Arrays vs. Slices

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

Just using the old blog as a bookmark service for this arrays v. slices in Go articles. I think this came across my radar a year or so ago because the official go docs sort of blow past arrays to get to the “new” stuff.

If you’re in a hurry —

Overall, slices are cleaner, more flexible, and less bug-prone than arrays, so you should prefer using them over arrays whenever possible.

Copyright © Alan Storm 1975 – 2019 All Rights Reserved

Originally Posted: 20th December 2018