Everything About ___
Live briefing

Everything about Variable shadowing

Variable masking one with the same name

In computer programming, variable shadowing occurs when a variable declared within a certain scope has the same name as a variable declared in an outer scope. At the level of identifiers, this is known as name masking. This outer variable is said to be shadowed by the inner variable, while the inner identifier is said to mask the outer identifier. This can lead to confusion, as it may be unclear which variable subsequent uses of the shadowed variable name refer to, which depends on the name resolution rules of the language. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Variable shadowingA 5-minute orientation
  2. Pick up a classic book: Java software solutionsThe most-reprinted book on the subject
  3. Read the landmark paper: Variable Outer Disk Shadowing around the Dipper Star RXJ1604.3–2130*Cited 77 times
  4. Go sideways: Closure (computer programming)A closely related topic
  5. Go sideways: Higher-order functionA closely related topic

📖 Definitions

No dictionary entry for this exact phrase.

🗂️ The subject at a glance

  1. Example

🏆 Landmark papers (most cited)

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics