TLDR Web Dev · QUICK LINKS

WHY GOLANG SLICES STILL SURPRISE ME

build-your-own.org5 min read

Summary from the TLDR Web Dev newsletter

Go slices are confusing because they behave as either dynamically sized arrays or fat pointers depending on context, leading to mutability and ownership issues and surprising behaviors like reslicing beyond the length and modifying the capacity.