~/talk

Fun With Pointers

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go]
slides:none on file

Shows that pointers in Go are values copied on call so mutating a pointer itself requires a pointer-to-pointer; demonstrates the common bug where range copies prevent updating slice elements (fixed by using pointers or indexed assignment). Uses the Go compiler’s escape analysis -m output to show when locals move to the heap and why that can hurt performance. Scans GitHub public data to find up to ~1,200 files with four levels of indirection (mostly tests), explains JSON marshalling quirks solved by using a non-nil interface holding an empty struct, and shows unsafe conversions (float64↔uint64) and cgo uses.

AI-written summary · about

  1. 0:00Introduction
  2. 7:10Pointers
  3. 12:49Values
  4. 13:02Indirection
  5. 14:52When to use pointers
  6. 28:07Data locality
  7. 31:05Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.