Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Go Class: 05 Arrays, Slices, and Maps

36.7K views on YouTube

In this segment I talk about Go’s built-in composite or “container” classes such as arrays, slices, and maps. For slices & maps, I expand on the concept of descriptor to help explain the difference between (say) a map’s storage and a map variable, and demonstrate the phenomenon of aliasing. Of course, I end with an example program showing maps and slices and sorting (oh my!).

This is a bit long; in retrospect I probably could have split slices and maps into their own segments. Sigh.

Slides at: https://github.com/matt4biz/go-class-slides/blob/trunk/xmas-2020/README.md

Code at: https://github.com/matt4biz/go-class-counts

See also this neat visual cheat sheet: https://ueokande.github.io/go-slice-tricks