~shahper.shahin
Back to Technical Blogs
Systems & Architecture
Aug 2024•5 min read

Variable Shadowing in Go: Mechanics, Pitfalls & Detection

Understanding lexical scoping and subtle bug vectors in concurrent Go routines.

#Go#Compilers#Concurrency#Software Engineering
Read on Medium

Lexical Scoping and Short Variable Declaration

Variable shadowing occurs when a variable declared within a nested scope shares the identical identifier as a variable in an outer enclosing scope.