~/talk

Designing Generic slices and maps Packages in Go

TalkinFrenchat Devoxx France 2024 · 2024-04-17..04-19· [go]
slides:none on file

Go’s generics (since 1.18) enabled adding two new standard-library packages: slices and maps. The slices package provides about 30 helper functions (clone, insert, concat, delete, compact, etc.), and implementations now nil out removed elements to avoid memory retention; govet will warn when a delete’s return value is ignored. The maps package brings most experimental functions but is missing Clear/Keys/Values from the experiment and its iterator design is still undecided.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Go design choices
  3. 3:53Slices and maps before generics
  4. 6:01Slices and maps packages
  5. 8:46Slice memory manipulation
  6. 10:13Delete function pitfalls
  7. 12:59Memory leaks and proposal
  8. 14:26Conclusion
~/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.