Fun with Slices
Slices can be seen in almost every Go program, but many developers are still unware of how they exactly work. On the surface we might think they are simple constructs that allows us to handle multiple elements of a single type, but they are more than just a collection. Specially for people new to Go, slices can be a source of pain because of the behaviors it possess that you wouldn't expect from a traditional dynamic array or list. In this session we are going to do a deep dive on the slice type, starting from arrays and slice declaration syntax, slicing operations, copying, resizing and its surprising (or not) side effects. The session will be composed most of code examples using the playground, with an eventual dive into the compiler source code to see the relevant bits of slice implementation.
Level: all /
Daniela Petruzalek is an experienced IT professional with background in software engineering, consulting, pre-sales and developer relations, currently working as a Principal Software Engineer at JP Morgan Chase. Her specialization is data engineering and back end development and she is recognized by Google as a Google Developer Expert in Go and Google Cloud Platform. She's also a Google Cloud Certified Data Engineer, Oracle Certified Professional and TEDx speaker. On her spare time she contributes to open source, plays video games and pets random cats on the streets.