Tagged articles
slices
13 articles · Page 1 of 1
The article examines a Go TODO app where moving a task required a Delete‑then‑Insert pattern, highlights the inefficiency of two memory moves, introduces the slices.Move proposal that performs a single copy, reviews community arguments, and makes a case for adding Move to the standard library.
DELETEGoINSERT
0 likes · 11 min read

This tutorial uses kitchen, traffic‑light, and conveyor‑belt analogies to demystify Go's variable declarations, if statements with pre‑statements, the versatile for loop, multi‑value functions, and slice mechanics, providing clear code examples and practical pitfalls for beginners.
ConditionalsGoLoops
0 likes · 6 min read

This article explores the newly introduced iterator feature in Go 1.23, explaining what iterators are, why they were added, how to implement them manually, how to use the new iter package, and how the slices and maps packages provide iterator‑friendly utilities for Go developers.
GenericsGo__iter__
0 likes · 34 min read

This article provides a comprehensive guide to Go's four main composite data types—arrays, slices, maps, and structs—explaining their definitions, initialization, operations, characteristics, and best‑practice recommendations for effective Go programming in software development.
Composite TypesGoarrays
0 likes · 10 min read

This article reveals thirteen subtle Go programming mistakes—from octal literals and integer overflow to floating‑point comparison, slice length vs. capacity, map initialization, and value copying—providing clear explanations, real‑world analogies, and concrete best‑practice code fixes to prevent bugs and performance issues.
Best PracticesGofloating-point
0 likes · 14 min read

This article explains Go's pointers, slices, and maps, detailing their internal relationships, demonstrating how slices share underlying arrays via pointers, and showing how maps store pointers for efficient data access, accompanied by practical code examples and usage tips for safe, high‑performance programming.
Gomapsmemory management
0 likes · 6 min read

This article explains three typical pitfalls of Go slices—ignoring the slice returned by append, unintentionally sharing the underlying array which can cause memory leaks, and the value‑copy behavior of for‑range loops—while also showing how to inspect slice internals using unsafe pointers.
BackendCOPYGo
0 likes · 5 min read

This article provides a comprehensive guide to installing and using Delve, the Go‑language source‑level debugger, covering installation methods, command‑line interface, debugging workflows, and practical examples for arrays, slices, and goroutines for developers.
DelveGoarrays
0 likes · 21 min read

This article lists ten typical Go programming pitfalls—from undefined enum values and misleading benchmarks to pointer misuse, slice initialization, error handling, context misuse, and goroutine closures—explaining why they hurt performance or correctness and offering concrete, idiomatic solutions.
Best PracticesConcurrencyContext
0 likes · 17 min read

The article explores Go's seemingly simple syntax but hidden complexities, demonstrating how deleting slice elements, handling performance, and limiting massive numbers of goroutines require non‑trivial code patterns, benchmarks, and careful design to avoid bugs and inefficiencies.
ConcurrencyGoperformance
0 likes · 8 min read

This article explains Go slice fundamentals, covering how to create slices with make, the relationship between length and capacity, the behavior of append, why zero values appear, the automatic growth mechanism, and how to safely copy slices using the copy function, illustrated with code examples and diagrams.
COPYGoappend
0 likes · 8 min read

This article introduces Go slices, explaining why they’re needed, how they differ from arrays, their memory layout, and demonstrates declaration, creation with make, slicing arrays, appending, modifying, deleting, and iterating over elements with clear code examples.
Goslices
0 likes · 9 min read

This article introduces core Go concepts—including slice internals, common pitfalls when using slices and maps, type conversion techniques, function parameter behavior, and a stack‑overflow‑safe directory‑listing example—providing practical code snippets and guidance for reliable Go development.
ConcurrencyGoType Conversion
0 likes · 9 min read
