Hacker News new | past | comments | ask | show | jobs | submit login

> Variable shadowing is actually a pretty clever thing that I'd like to see in other languages.

Shadowing exists in most languages, the biggest difference being the allowed scope relationships between the shadower and the shadowee: most languages allow inter-function and inter-block shadowing (if they have actual block-level scope so e.g. not Python).

Intra-block shadowing is a much rarer feature, and one which Go doesn't have.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: