Scope and name resolution, the rules behind "which x is this?"
Static vs dynamic scoping, shadowing, and why almost every real language chose static scoping — with a worked C++ example showing exactly how resolution happens at compile time.
9 min readUpdated 2026-09-03compiler-designscopename-resolutionsemantics