The strengths of the 'weak' package


Details
Agenda:
18:30 - Arrival, refreshments and networking
18:55 - Introductions from Humand Talent and Black Cow Technology
19:00 - Talk from Sam Burns
19:45 - Q&A
20:00 - A chance for more networking
20:30 - Close
Talk from Sam Burns: 'The Strengths of the 'weak' Package'
Go 1.24, released in Feb '25, adds the new 'weak' package to the standard library. The package brings weak pointers to the language for the first time. These lightweight references allow developers to manage memory more efficiently, allowing garbage collection of variables even when referenced.
With weak pointers, you can write more memory-efficient caching, track values with observers without preventing their cleanup, and build powerful data structures such as canonicalisation maps. As with similar features in C++ and other languages, we can learn to navigate the quirks of this new item in the Go developer's toolbox.
Join us for an overview of the anatomy of the 'weak' package, and to discover how weak pointers can help you write memory-efficient Go.
Sam Burns is a developer, software architect, and application security researcher.
Golang Oxford is hosted by Black Cow Technology and organised by Humand Talent.

The strengths of the 'weak' package