TLDR Web Dev · QUICK LINKS
WHY GOLANG SLICES STILL SURPRISE ME
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.