Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't see how it could introduce bugs. The point of replacing a variable is precisely to make a value that is no longer needed inaccessible. If anything introducing new variables with new names has the potential to introduce subtle bugs since someone could mistakenly use one of the variables that is no longer valid or no longer needed.


When you are modifying a long closure and don’t notice that you are shadowing a variable that is used later.

I know “use shorter functions” but tell that to my coworkers.




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

Search: